IO-File-WithPath

 view release on metacpan or  search on metacpan

lib/IO/File/WithPath.pm  view on Meta::CPAN


sub new {
    my $class = shift;
    my $path  = File::Spec->rel2abs(shift);

    my $io = IO::File->new($path, @_);

    # symboltable hack
    ${*$io}{+__PACKAGE__} = $path;

    bless $io => $class;
}

sub path { 
    my $io = shift;
    ${*$io}{+__PACKAGE__};
}


1;
__END__

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.564 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )