Skip Menu |

This queue is for tickets about the Template-Alloy CPAN distribution.

Report information
The Basics
Id: 42214
Status: resolved
Priority: 0/
Queue: Template-Alloy

People
Owner: Nobody in particular
Requestors: BEROV [...] cpan.org
Cc:
AdminCc:

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



Subject: Template::Alloy fails to store the AST or Compiled perl code on Windows
Hi Paul I needed to run my code using TA on Windows but found that it fails to store/cache files. The reason is the colon ":" in Window paths. For example C:/something or D:/another If my CACHE_DIR is D:/bgcc/tmp and the template file was D:/bgcc/templates/pre_process.tt Alloy tries to create D:/bgcc/tmp/D:/bgcc/templates/pre_process.tt.sto which is not a valid path under Windows. I send you my quick and dirty solution, hoping that you will fix wherever in the code is needed. Thank you in advance.
Subject: Alloy.patch
--- C:\DOCUME~1\berov\LOCALS~1\Temp\Alloy.pm-revBASE.svn001.tmp.pm âòîðíèê ßíóàðè 6 02:25:00 2009 +++ D:\bgcc\perl\CPAN\Template\Alloy.pm âòîðíèê ßíóàðè 6 02:22:38 2009 @@ -340,6 +340,7 @@ $doc->{'modtime'} ||= (stat $doc->{'_filename'})[9]; if ($self->{'COMPILE_DIR'} || $self->{'COMPILE_EXT'}) { my $file = $doc->{'_filename'}; + $file =~ s|:||g; #make tmp/D:/bgcc to look like tmp/D/bgcc if ($self->{'COMPILE_DIR'}) { $file = $self->{'COMPILE_DIR'} .'/'. $file; } elsif ($doc->{'_is_str_ref'}) { @@ -393,6 +394,7 @@ $doc->{'modtime'} ||= (stat $doc->{'_filename'})[9]; if ($self->{'COMPILE_DIR'} || $self->{'COMPILE_EXT'}) { my $file = $doc->{'_filename'}; + $file =~ s|:||g; #make tmp/D:/bgcc to look like tmp/D/bgcc if ($self->{'COMPILE_DIR'}) { $file = $self->{'COMPILE_DIR'} .'/'. $file; } elsif ($doc->{'_is_str_ref'}) {
I added a slightly more specific and localized patch. It is now in the released 1.015