Net-ChooseFName
view release on metacpan or search on metacpan
lib/Net/ChooseFName.pm view on Meta::CPAN
Returns the provisional directory part of the filename. Unless
overriden, replaces empty components by the string C<empty> preceeded
by the value of C<protect_pref> option; then applies the method
fix_component() to each component of the directory.
=cut
sub protect_directory {
my ($self, $dirname) = @_;
$dirname =~ s,/(?=/),/$self->{protect_pref}empty,g; # empty components
return join '/', map($self->fix_component($_,1), split m|/|, $dirname), '';
}
=item directory_found($dirname, $f, $append, $url, $suggested, $type, $enc)
A callback to process the calculated directory name. Unless
overriden, it creates the directory (with permissions per option
C<dir_mode>) if the option C<mkpath> is TRUE.
Actually, the directory name is the return value, so this is the last
chance to change the directory name...
( run in 2.696 seconds using v1.01-cache-2.11-cpan-71847e10f99 )