Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed IO::File dependency

  • Loading branch information...
commit f51219f9dbe1b4945e25139e406140d551b9606a 1 parent 7ffbb6f
@dann authored
View
3  angelos-core/Makefile.PL
@@ -78,6 +78,9 @@ requires 'Term::ReadLine';
requires 'JSON::XS';
requires 'MIME::Types';
+# Middleware
+requires 'File::stat';
+
if (HAVE_MP) {
Apache::TestMM::filter_args();
#Apache::TestMM::generate_script('t/integration/modperl/TEST');
View
8 angelos-core/bugs/issue-99604fc0a18ba7d3f53e5f6a5adf92fe31054920.yaml
@@ -5,8 +5,8 @@ type: :task
component: middleware
release: "0.01"
reporter: dann <techmemo@gmail.com>
-status: :unstarted
-disposition:
+status: :closed
+disposition: :fixed
creation_time: 2009-01-14 15:29:13.497768 Z
references: []
@@ -16,3 +16,7 @@ log_events:
- dann <techmemo@gmail.com>
- created
- ""
+- - 2009-01-17 17:17:48.462601 Z
+ - dann <techmemo@gmail.com>
+ - closed with disposition fixed
+ - ""
View
7 angelos-core/lib/Angelos/Middleware/Static.pm
@@ -5,7 +5,7 @@ extends 'Angelos::Middleware';
use Angelos::Exceptions;
use HTTP::Engine::Response;
use Angelos::MIMETypes;
-use IO::File;
+use Path::Class;
use Angelos::Home;
use File::stat;
@@ -68,9 +68,8 @@ sub serve_static {
$res->header( 'Content-Length' => $stat->size );
$res->header( 'Last-Modified' => $stat->mtime );
- my $fh = IO::File->new( $full_path, 'r' );
+ my $fh = $full_path->openr;
if ( defined $fh ) {
- warn 'hoge';
binmode $fh;
$res->code(200);
$res->body($fh);
@@ -101,3 +100,5 @@ sub _extension_to_type {
}
__END_OF_CLASS__
+
+__END__
Please sign in to comment.
Something went wrong with that request. Please try again.