aliased-factory
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/aliased/factory.pm view on Meta::CPAN
my $bort = BAR->Baz->Bort->new(...);
This would load the Foo::Bar::Baz and then Foo::Bar::Baz::Bort packages.
Each method call require()s the corresponding package and returns an
aliased::factory object, which has a new() method (see below.)
=cut
my $new_factory = sub {
my $class = shift;
bless \(shift) => $class;
};
my $err;
my $load = sub {
my $package = shift;
$package =~ s#::#/#g;
$package .= '.pm';
return 1 if(exists $INC{$package});
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.147 second using v1.00-cache-2.02-grep-82fe00e-cpan-cec75d87357c )