SPVM::File::Basename::Instance - Object-Oriented File::Basename
The SPVM::File::Basename::Instance class of SPVM has the methods for Object-Oriented File::Basename.
use File::Basename::Instance; my $fb = File::Basename::Instance->new; my $path = "dir/a.txt"; # fileparse { my $ret = $fb->fileparse($path); # a.txt my $base_name = $ret->[0]; # dir/ my $dir_name = $ret->[1]; } # basename { # a.txt my $base_name = $fb->basename($path); } # dirname { # dir my $dir_name = $fb->dirname($path); }
static method new : File::Basename::Instance ();
method fileparse : string[] ($path : string);
method basename : string ($path : string);
method dirname : string ($path : string);
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::File::Basename, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::File::Basename
CPAN shell
perl -MCPAN -e shell install SPVM::File::Basename
For more information on module installation, please visit the detailed CPAN module installation guide.