Bootylicious

 view release on metacpan or  search on metacpan

lib/Bootylicious/Plugin/Pingback.pm  view on Meta::CPAN

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    unshift @{$app->renderer->classes}, __PACKAGE__;
 
    $app->plugins->on(
        after_dispatch => sub {
            my ($c) = @_;
 
            return unless $c->req->method =~ m/GET|HEAD/;
 
            return unless $c->res->code && $c->res->code == 200;
 
            return unless $c->match->endpoint->name eq 'article';
 
            $c->res->headers->header(
                'X-Pingback' => $c->url_for('pingback', format => undef)->to_abs);
        }
    );
}
 
sub _pingback {
    my $self = shift;



( run in 0.830 second using v1.01-cache-2.11-cpan-e9199f4ba4c )