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

Owner: Nobody in particular
Requestors: BEROV [...]

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
Download (untitled) / with headers
text/plain 502b
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/ Alloy tries to create D:/bgcc/tmp/D:/bgcc/templates/ 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
Download Alloy.patch
text/x-diff 987b
--- C:\DOCUME~1\berov\LOCALS~1\Temp\ âòîðíèê ßíóàðè 6 02:25:00 2009 +++ D:\bgcc\perl\CPAN\Template\ âòîðíèê ßíóàðè 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

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to