This file is indexed.

/usr/share/perl5/Web/Simple/Role.pm is in libweb-simple-perl 0.031-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package Web::Simple::Role;
use strictures 1;
use warnings::illegalproto ();
use Moo::Role ();

our $VERSION = '0.031';

sub import {
  my ($class, $app_package) = @_;
  $app_package ||= caller;
  eval "package $app_package; use Web::Dispatch::Wrapper; use Moo::Role; 1"
    or die "Failed to setup app package: $@";
  strictures->import;
  warnings::illegalproto->unimport;
}

1;
__END__

=head1 NAME

Web::Simple::Role - Define roles for Web::Simple applications

=head1 SYNOPSIS

  package MyApp;
  use Web::Simple;
  with MyApp::Role;

  sub dispatch_request { ... }

and in the role:

  package MyApp::Role;
  use Web::Simple::Role;

  around dispatch_request => sub {
    my ($orig, $self) = @_;
    return (
      $self->$orig,
      sub (GET + /baz) { ... }
    );
  };

Now C<MyApp> can also dispatch C</baz>

=head1 AUTHORS

See L<Web::Simple> for authors.

=head1 COPYRIGHT AND LICENSE

See L<Web::Simple> for the copyright and license.

=cut