X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-WrapCGI.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FCGIBin.pm;h=c9119053f8151f81d52ec430a97a4e1b08885ae0;hp=88dec289810ed0d26a4ba8744d33774d369429fa;hb=2340af9d7778ff7ed8e40289015463570ed09c6e;hpb=12d29ebfa3b3b43d535eba9d6885c9e7d3d38ada diff --git a/lib/Catalyst/Controller/CGIBin.pm b/lib/Catalyst/Controller/CGIBin.pm index 88dec28..c911905 100644 --- a/lib/Catalyst/Controller/CGIBin.pm +++ b/lib/Catalyst/Controller/CGIBin.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Class::C3; -use URI::Escape; use File::Slurp 'slurp'; use File::Find::Rule (); use Catalyst::Exception (); @@ -13,6 +12,7 @@ use IPC::Open3; use Symbol 'gensym'; use List::MoreUtils 'any'; use IO::File (); +use namespace::clean -except => 'meta'; use parent 'Catalyst::Controller::WrapCGI'; @@ -22,11 +22,11 @@ Catalyst::Controller::CGIBin - Serve CGIs from root/cgi-bin =head1 VERSION -Version 0.003 +Version 0.004 =cut -our $VERSION = '0.003'; +our $VERSION = '0.004'; =head1 SYNOPSIS @@ -123,6 +123,11 @@ sub register_actions { } $self->next::method($app, @_); + +# Tell Static::Simple to ignore the cgi-bin dir. + if (!any{ $_ eq 'cgi-bin' } @{ $app->config->{static}{ignore_dirs}||[] }) { + push @{ $app->config->{static}{ignore_dirs} }, 'cgi-bin'; + } } =head1 METHODS