Data-Context
view release on metacpan or search on metacpan
lib/Data/Context.pm view on Meta::CPAN
return $dci->get_data($vars);
}
sub get_instance {
my ( $self, $path ) = @_;
# TODO add some cache controls here or in ::Instance::init();
return $self->instance_cache->{$path} if $self->instance_cache->{$path};
my @path = split m{/+}xms, $path;
shift @path if !defined $path[0] || $path[0] eq '';
push @path, 'index' if $path =~ m{/$}xms;
my $count = 1;
my $loader;
# find the most appropriate file
PATH:
while ( @path ) {
$loader = $self->finder->find(@path);
( run in 2.202 seconds using v1.01-cache-2.11-cpan-71847e10f99 )