Skip Menu |

This queue is for tickets about the File-Find-Rule CPAN distribution.

Report information
The Basics
Id: 20459
Status: resolved
Priority: 0/
Queue: File-Find-Rule

People
Owner: Nobody in particular
Requestors: jeff.bunds [...] ubs.com
richardc [...] unixbeard.net
Cc:
AdminCc:

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



CC: <richardc [...] unixbeard.net>
Subject: File::Find::Rule chokes on filenames that contain (e.g.) literal '@' characters
Date: Fri, 14 Jul 2006 15:28:56 +0100
To: <bug-File-Find-Rule [...] rt.cpan.org>
From: <jeff.bunds [...] ubs.com>
Hello, File::Find::Rule chokes on filenames that contain (e.g.) literal '@' characters: Test case input: filename: svnadmin@axe.crontab Test case code: my $file = File::Find::Rule ->file; foreach my $svn_work_area_file ( File::Find::Rule ->or( $svn, $file ) ->in( $svn_work_area ) ) { my $svn_work_area_file_basename = basename $svn_work_area_file; foreach my $foo ( $file ->name( quotemeta $svn_work_area_file_basename ) ->in ( @live_deployment_subdirectories ) ) { print "$foo\n"; } } Error: Possible unintended interpolation of @axe in string at (eval 89) line 67, <DATA> line 225 (#1) (W ambiguous) You said something like `@foo' in a double-quoted string but there was no array @foo in scope at the time. If you wanted a literal @foo, then write it as \@foo; otherwise find out what happened to the array you apparently lost track of. Uncaught exception from user code: compile error 'sub { (my $path = $File::Find::name) =~ s#^\./##; my @args = ($_, $File::Find::dir, $path); my $maxdepth = $self->{maxdepth}; my $mindepth = $self->{mindepth}; my $relative = $self->{relative}; # figure out the relative path and depth my $relpath = $File::Find::name; $relpath =~ s{^\Q$topdir\E/?}{}; my $depth = scalar File::Spec->splitdir($relpath); #print "name: '$File::Find::name' "; #print "relpath: '$relpath' depth: $depth relative: $relative\n"; defined $maxdepth && $depth >= $maxdepth and $File::Find::prune = 1; defined $mindepth && $depth < $mindepth and return; #print "Testing '$_'\n"; my $discarded; return unless ( -f $_ ) # file && ( m((?-xism:^(?=[^\.])README$)) ) # name && ( m((?-xism:^(?=[^\.])subversion\.csr$)) ) # name && ( m((?-xism:^(?=[^\.])subversion\.crt$)) ) # name && ( m((?-xism:^(?=[^\.])subversion\.key$)) ) # name && ( m((?-xism:^(?=[^\.])CAcert\.pem$)) ) # name && ( m((?-xism:^(?=[^\.])axe\.csr$)) ) # name && ( m((?-xism:^(?=[^\.])axe\.crt$)) ) # name && ( m((?-xism:^(?=[^\.])axe\.key$)) ) # name && ( m((?-xism:^(?=[^\.])chainsaw\.csr$)) ) # name && ( m((?-xism:^(?=[^\.])chainsaw\.crt$)) ) # name && ( m((?-xism:^(?=[^\.])chainsaw\.key$)) ) # name && ( m((?-xism:^(?=[^\.])httpd\.conf$)) ) # name && ( m((?-xism:^(?=[^\.])httpd\.conf$)) ) # name && ( m((?-xism:^(?=[^\.])config$)) ) # name && ( m((?-xism:^(?=[^\.])servers$)) ) # name && ( m((?-xism:^(?=[^\.])repos_access_control$)) ) # name && ( m((?-xism:^(?=[^\.])README$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfoService\.pm_new$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfoService\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])AuthzHandler\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])Lookup\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])AuthenHandler\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])Cache\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])Utils\.pm$)) ) # name && ( m((?-xism:^(?=[^\.])generateSOAPLiteStubsFromWSDL\.sh$)) ) # name && ( m((?-xism:^(?=[^\.])dswssauth_wsdl\.v1\.3\.zip$)) ) # name && ( m((?-xism:^(?=[^\.])README$)) ) # name && ( m((?-xism:^(?=[^\.])Logon-service\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])README$)) ) # name && ( m((?-xism:^(?=[^\.])Logon-binding\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])README$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfoBinding\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfo\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfoService\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])JeepPersonWSInfoJava\.wsdl$)) ) # name && ( m((?-xism:^(?=[^\.])repo_authz_admin$)) ) # name && ( m((?-xism:^(?=[^\.])new_svn_repo$)) ) # name && ( m((?-xism:^(?=[^\.])repos$)) ) # name && ( m((?-xism:^(?=[^\.])lonergjj_repo_authz_admin$)) ) # name && ( m((?-xism:^(?=[^\.])ubslogo\.gif$)) ) # name && ( m((?-xism:^(?=[^\.])svnindex\.xsl$)) ) # name && ( m((?-xism:^(?=[^\.])svnindex\.css$)) ) # name && ( m((?-xism:^(?=[^\.])svnadmin@axe\.crontab$)) ) # name ; return if $discarded; if ($relative) { push @found, $relpath if $relpath ne ""; } else { push @found, $path; } }' Global symbol "@axe" requires explicit package name at (eval 89) line 67, <DATA> line 225. at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/File/Find/Rule.pm line 579 File::Find::Rule::in('File::Find::Rule=HASH(0x8405fb0)', '/sbcimp/dyn/data/XTools/svnadmin/config', '/sbcimp/dyn/data/XTools/svnadmin/DSWSSAuth', '/sbcimp/dyn/data/XTools/svnadmin/lib', '/sbcimp/dyn/data/XTools/svnadmin/repos_access_control', '/sbcimp/dyn/data/XTools/svnadmin/server', '/sbcimp/dyn/data/XTools/svnadmin/UBS_apache_modules', '/sbcimp/dyn/data/XTools/svnadmin/utils', '/sbcimp/dyn/data/XTools/svnadmin/website', ...) called at ./normalise_live_env_with_subversion_workarea line 49 Best Regards, Jeff Bunds XTools CAI Equities IT Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
CC: bug-File-Find-Rule [...] rt.cpan.org
Subject: Re: File::Find::Rule chokes on filenames that contain (e.g.) literal '@' characters
Date: Fri, 14 Jul 2006 17:06:49 +0100
To: jeff.bunds [...] ubs.com
From: Richard Clamp <richardc [...] unixbeard.net>
jeff.bunds@ubs.com wrote: Show quoted text
> Hello, > > File::Find::Rule chokes on filenames that contain (e.g.) literal '@' > characters: > > Test case input: > > filename: svnadmin@axe.crontab > > Test case code:
This reduces down to: File::Find::Rule->name("foo\@bar.com")->in("anywhere"); Which turns out to be a bug in Text::Glob 0.06. Please upgrade to version 0.07, just released to CPAN. -- Richard Clamp <richardc@unixbeard.net>