package UFile; use JFile; @ISA = qw(JFile); #公開したいサブルーチン #@EXPORT = qw(DelSpace Reduce01 MakePath RegExpQuote); use strict; use LWP::Simple; sub new { my ($module, $path, $mode) = @_; my $this = {}; bless $this; if(defined $path and defined $mode) { return undef unless($this->Open($path, $mode)); } return $this; } sub DESTROY { my $this = shift; $this->Close(); } sub get($) { my ($URL) = @_; if($URL =~ /:\/\//i) { return LWP::Simple::get($URL); } return JFile::new->ReadFile($URL); } sub head($) { my ($URL) = @_; return LWP::Simple::head($URL); } 1;