Mira
view release on metacpan or search on metacpan
lib/Mira/Control/Static.pm view on Meta::CPAN
my $floor_static = $config->{$floor}->{static};
my $floor_path = catdir($source, 'content', $floor);
foreach my $static (@{ $statics->{$floor} })
{
my ($name, $dir) = fileparse($static);
$name =~ s{^_}{};
$name = lc $name;
if ($dir =~ /\Q$floor_path\E(.*)/)
{
my $target = $1;
my @root_path = split m{/|\\|::}, $config->{$floor}->{root};
my $address = catdir($source, $publishdir, @root_path, $target, $name);
push @{$self->{$floor}}, {path => $static, address => $address} ;
}
}
}
my @main_root_path = split m{/|\\|::}, $config->{_default}->{static};
-d catdir($source, 'statics') and $self->{_default} = [{
path => catdir($source, 'statics'),
address => catdir($source, $publishdir, @main_root_path)
}];
-d catdir($source, 'root') and $self->{_root} = [{
path => catdir($source, 'root'),
address => catdir($source, $publishdir)
}];
( run in 0.687 second using v1.01-cache-2.11-cpan-71847e10f99 )