From: Andy Grundman Date: Thu, 15 Dec 2005 14:58:04 +0000 (+0000) Subject: Static::Simple 0.13 copy to core X-Git-Tag: 5.7099_04~773 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=0db142210599031ba4944a0b02d6dba07475a9e5 Static::Simple 0.13 copy to core --- diff --git a/Changes b/Changes index a768594..962038b 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ This file documents the revision history for Perl extension Catalyst. 5.62 + - Static::Simple: Fixed bug in ignore_dirs under win32. - Display version numbers of loaded plugins. (Curtis Poe) - Added class and method for catched exceptions messages - Updated PAR support to use "make catalyst_par", diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index 827c272..fedd309 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -9,7 +9,7 @@ use IO::File; use MIME::Types; use NEXT; -our $VERSION = '0.12'; +our $VERSION = '0.13'; __PACKAGE__->mk_classdata( qw/_static_mime_types/ ); __PACKAGE__->mk_accessors( qw/_static_file @@ -130,13 +130,13 @@ sub _locate_static_file { next DIR_CHECK; } } else { - $dir =~ s/\/$//xms; + $dir =~ s/(\/|\\)$//xms; if ( -d $dir && -f $dir . '/' . $path ) { # do we need to ignore the file? for my $ignore ( @{ $c->config->{static}->{ignore_dirs} } ) { - $ignore =~ s{/$}{}; - if ( $path =~ /^$ignore\// ) { + $ignore =~ s{(/|\\)$}{}; + if ( $path =~ /^$ignore(\/|\\)/ ) { $c->_debug_msg( "Ignoring directory `$ignore`" ) if ( $c->config->{static}->{debug} ); next DIR_CHECK;