App-GitFind
view release on metacpan or search on metacpan
lib/App/GitFind/PathClassMicro.pm view on Meta::CPAN
? (ref $from, $from->{file_spec_class})
: ($from, $App::GitFind::PathClassMicro::Foreign));
return bless {file_spec_class => $fs_class}, $class;
}
sub is_dir { 0 }
sub _spec_class {
my ($class, $type) = @_;
die "Invalid system type '$type'" unless ($type) = $type =~ /^(\w+)$/; # Untaint
my $spec = "File::Spec::$type";
## no critic
eval "require $spec; 1" or die $@;
return $spec;
}
sub new_foreign {
my ($class, $type) = (shift, shift);
local $App::GitFind::PathClassMicro::Foreign = $class->_spec_class($type);
return $class->new(@_);
( run in 0.339 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )