Skip Menu |

This queue is for tickets about the Catalyst-Helper-AuthDBIC CPAN distribution.

Report information
The Basics
Id: 57648
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Catalyst-Helper-AuthDBIC

People
Owner: Nobody in particular
Requestors: rfulbrig [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.12
Fixed in: (no value)



Subject: Hard-coded forward slashes do not work on Windows
Module: AuthDBIC 0.12 Perl: ActivePerl 5.8.9 Build 827 OS: Windows (XP and Vista) Line 101 in AuthDBIC-0.12 uses hard-coded forward slashes in the command sent to 'system'. This fails on Windows, which requires backslashes. You could set and use a variable with the appropriate slash using an 'if' statement like this: my $slash; if ($^O eq 'MSWin32') { $slash = "\\"; } else{ $slash = "/"; } Thanks, Roy Fulbright P.S. I'm working my way through your book. Good job!
On Wed May 19 21:06:19 2010, rfulbrig@hotmail.com wrote: Show quoted text
> Module: AuthDBIC 0.12 > Perl: ActivePerl 5.8.9 Build 827 > > OS: Windows (XP and Vista) > Line 101 in AuthDBIC-0.12 uses hard-coded forward slashes in the > command sent to 'system'. This fails on Windows, which requires > backslashes. > > You could set and use a variable with the appropriate slash using > an 'if' statement like this: > > my $slash; > if ($^O eq 'MSWin32') { > $slash = "\\"; > } else{ > $slash = "/"; > } > > Thanks, > Roy Fulbright > > P.S. I'm working my way through your book. Good job!
Add Strawberry Perl 5.12.0.1 (64-bit, but that doesn't matter) to where 0.12 fails, as well. Here's some better code that should work anywhere (you're already using File::Spec, so carrying on the good fight...) my @cmd = ( File::Spec->catfile( File::Spec->curdir(), 'script', "${app_prefix}_create.pl", ), 'model', 'Auth', 'DBIC::Schema', app_name() . "::Auth::Schema", ...
Fixed in 0.13, Thanks