# New Ticket Created by Jan Dubois # Please include the string: [perl #54728] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=54728 > The update to PathTools-3.27 triggers a bug in the localization of $1: #!perl use File::Spec::Win32 (); print File::Spec::Win32->catfile("c:/foo", "bar"), "\n"; "bar" =~ m/(.*)/; print File::Spec::Win32->catfile("c:/foo", $1), "\n"; "bar" =~ m/(.*)/; print File::Spec::Win32->catfile("c:/foo", "$1"), "\n"; __END__ With PathTools-3.27: C:\foo\bar C:\foo\c: C:\foo\bar With older version of PathTools: C:\foo\bar C:\foo\bar C:\foo\bar The problem seems to be that $1 isn't properly localized. A simple workaround in File::Spec::Win32 is to stringify @_ in _canon_cat(), e.g. sub _canon_cat(@) { @_ = map "$_", @_; my $first = shift; But it would be nicer if the problem can be solved in a more general manner. I encountered this problem when I was testing Pod::Simple with 5.8.9-tobe, which contains this code triggering the problem in Pod::Simple::HTMLBatch: if( ref($chunk->[-1]) and $url =~ m{^(_[-a-z0-9_]+\.css$)} ) { $outfile = $self->filespecsys->catfile( $outdir, $1 ); Cheers, -JanThread Next