Bryar
view release on metacpan or search on metacpan
lib/Bryar/Frontend/Base.pm view on Meta::CPAN
for (qw(comments format)) {
$args{$_} = $params{$_} if exists $params{$_};
}
$self->process_new_comment($config, %params) if $params{newcomment};
return %args;
}
sub parse_path {
my ($self, $config) = @_;
my $pi = $self->obtain_path_info();
my @pi = split m{/}, $pi;
shift @pi while @pi and not$pi[0];
#...
my %args;
if ($pi[-1] and $pi[-1] eq "xml") { $args{format} = "xml"; pop @pi; }
if ($pi[-1] and $pi[-1] =~ /^id_([0-9]+)/) { $args{id} = $1; pop @pi; }
if ($pi[0] and $pi[0] =~ /^([a-zA-Z]\w*)/
and $pi[0] !~ /^(?:before)_[0-9]+$/) { # We have a subblog
$args{subblog} = $1;
shift @pi;
( run in 0.373 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )