This file is indexed.

/usr/share/perl5/App/Prolix/MooseHelpers.pm is in prolix 0.03-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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package App::Prolix::MooseHelpers;
# ABSTRACT: Moose helpers for App::Prolix

use Moose ();
use Moose::Exporter;
use warnings;

Moose::Exporter->setup_import_methods(
    with_meta => [ 'has_counter', 'has_rw', 'has_option' ]);

sub has_rw {
    my ($meta, $name, %options) = @_;
    $meta->add_attribute(
        $name,
        is => 'rw',
        %options
    );
}

sub has_option {
    my ($meta, $name, %options) = @_;
    $meta->add_attribute(
        $name,
        is => 'rw',
        metaclass => 'Getopt',
        %options
    );
}

sub has_counter {
    my ($meta, $name, %options) = @_;
    $meta->add_attribute(
        $name,
        traits => ['Counter'],
        is => 'ro',
        isa     => 'Num',
        default => 0,
        handles => {
            ('inc_' . $name)   => 'inc',
            ('dec_' . $name)   => 'dec',
            ('reset_' . $name) => 'reset',
        },
        %options
    );
}

6;


__END__
=pod

=head1 NAME

App::Prolix::MooseHelpers - Moose helpers for App::Prolix

=head1 VERSION

version 0.03

=head1 AUTHOR

Gaal Yahas <gaal@forum2.org>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Google, Inc.

This is free software, licensed under:

  The MIT (X11) License

=cut