- or download this
BEGIN { *basename = shortcutted { s!.*/!! for @_ }; }
...
# note how $_ still contains the full pathname
# ...
}
- or download this
sub shortcutted(&) {
my $sub = shift;
...
return $nondestructive ? @byval[ 0 .. $#byval ] : ();
};
}
- or download this
use Test::More;
...
is_deeply( \@res, \@modified, '...returned correctly' );
BEGIN { $num_tests += 2 }
}