| 1 | package File::Next::OO; | ||
| 2 | |||
| 3 | $VERSION = '0.01_04'; | ||
| 4 | 4 | ▶ | use File::Next 0.28; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 5 | |||
| 6 | #use warnings; | ||
| 7 | use strict; | ||
| 8 | |||
| 9 | BEGIN { | ||
| 10 | |||
| 11 | sub new { | ||
| 12 | shift if ref $_[1] eq 'HASH'; | ||
| 13 | my $i = File::Next::files(@_); | ||
| 14 | return wantarray ? do { my @t; while( my $f = $i->() ){ push @t, $f } @t } : $i; | ||
| 15 | } | ||
| 16 | |||
| 17 | *files = \&new; | ||
| 18 | *name = \$File::Next::name; | ||
| 19 | *dir = \$File::Next::dir; | ||
| 20 | |||
| 21 | } | ||
| 22 | |||
| 23 | 1; | ||
| 24 | __END__ | ||