Skip Menu |

This queue is for tickets about the Module-Starter-PBP CPAN distribution.

Report information
The Basics
Id: 21557
Status: open
Priority: 0/
Queue: Module-Starter-PBP

People
Owner: Nobody in particular
Requestors: jim_graham [...] sympatico.ca
Cc:
AdminCc:

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



Subject: Breaks on standard windows home directories.
Date: Mon, 18 Sep 2006 17:10:07 -0400
To: <bug-Module-Starter-PBP [...] rt.cpan.org>
From: "Jim Graham" <jim_graham [...] sympatico.ca>
Hi Module::Starter::PBP v0.0.3 breaks on windows standard home directories, of the form C:\Documents and Settings\<user>. 1. in setup, the default template_dir value is derived from $ENV{HOME}. On windows, this can be derived from $ENV{USERPROFILE} 2. in module creation, the t_guts method breaks on template_dirs with spaces in them due to the file glob. for my $test_file ( map { s{\A .*/t/}{}xms; $_; } glob "$self->{template_dir}/t/*" ) { This can be fixed by converting the template_dir on setup to an 8.3 (non-space) directory. The following diff addresses these 2 issues. 153a153,157 Show quoted text
> #-- win32 update > if ( ! defined $ENV{HOME} and defined $ENV{USERPROFILE}) { > $ENV{HOME} = $ENV{USERPROFILE}; > } >
164a169,173 Show quoted text
> if ( $^O =~ m{MSWIN|dos}i ) { > require Win32; > $template_dir = Win32::GetShortPathName( $template_dir); > $template_dir =~ s{\\}{/}g; > }
Thanks, Jim Graham
From: apthorpe [...] cynistar.net
A one-liner to convert long space-polluted Windows path names to ugly, space-free 8.3 filenames is: perl -e "use Win32; my $longdir=q{C:\Documents and Settings\Username\.module-starter\PBP}; print Win32::GetShortPathName($longdir), qq{\n};" Caveat: The path must already exist for this to work.
From: mascip [...] gmail.com
i set MODULE_STARTER_DIR to C:\ and template_dir to C:\.module-starter and it worked. I didn't like this solution, though. I am still wondering whether it has any drawbacks, as i can copy-paste my template directory wherever i want after that. On Mon Dec 22 15:52:04 2008, arclight wrote: Show quoted text
> A one-liner to convert long space-polluted Windows path names to ugly, > space-free 8.3 filenames is: > > perl -e "use Win32; my $longdir=q{C:\Documents and > Settings\Username\.module-starter\PBP}; print > Win32::GetShortPathName($longdir), qq{\n};" > > Caveat: The path must already exist for this to work.