IO-File-WithPath

 view release on metacpan or  search on metacpan

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

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 1.193 second using v1.00-cache-2.02-grep-82fe00e-cpan-49f99fa48dc )