From: Andy Grundman Date: Thu, 15 Dec 2005 14:45:08 +0000 (+0000) Subject: Static::Simple 0.13, fixed win32 bug in ignore_dirs X-Git-Tag: v0.13^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Ftags%2Fv0.13;hp=e822b965672a9718241d342ddca5b9f72caeba3f;p=catagits%2FCatalyst-Plugin-Static-Simple.git Static::Simple 0.13, fixed win32 bug in ignore_dirs --- diff --git a/Changes b/Changes index 9fc2c71..981130e 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple -0.12 +0.13 2005-12-15 10:00:00 + - Fixed bug in ignore_dirs under win32. + +0.12 (released only with Catalyst) - Made prepare_action play nice with other plugins by not short- circuiting. - Added tmpl to the ignored extensions. diff --git a/META.yml b/META.yml index 2eabff5..b7418c3 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- name: Catalyst-Plugin-Static-Simple -version: 0.12 +version: 0.13 author: - 'Andy Grundman, ' abstract: Make serving static pages painless. @@ -11,5 +11,5 @@ requires: provides: Catalyst::Plugin::Static::Simple: file: lib/Catalyst/Plugin/Static/Simple.pm - version: 0.12 -generated_by: Module::Build version 0.26 + version: 0.13 +generated_by: Module::Build version 0.2611 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;