line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Grepl::Base; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
37
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
157
|
|
4
|
6
|
|
|
6
|
|
29
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
167
|
|
5
|
6
|
|
|
6
|
|
29
|
use Scalar::Util 'reftype'; |
|
6
|
|
|
|
|
27
|
|
|
6
|
|
|
|
|
1940
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
App::Grepl::Base - Common methods for App::Grepl (internal only) |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.01 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Common methods for App::Grepl |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 METHODS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 Class Methods |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head3 C |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $grepl = App::Grepl->new; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Common constuctor for C classes. If an argument is passed, it |
32
|
|
|
|
|
|
|
must be a hashref. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
All initialization should be via an overridden C<_initialize> method. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub new { |
39
|
33
|
|
|
33
|
1
|
15678
|
my ( $class, $arg_for ) = @_; |
40
|
33
|
|
100
|
|
|
119
|
$arg_for ||= {}; |
41
|
|
|
|
|
|
|
|
42
|
33
|
|
100
|
|
|
180
|
my $reftype = reftype $arg_for || 'SCALAR'; |
43
|
33
|
100
|
|
|
|
108
|
unless ( 'HASH' eq $reftype ) { |
44
|
1
|
|
|
|
|
11
|
$class->_croak("Argument to new must be a hashref, not a ($reftype)"); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
32
|
|
|
|
|
103
|
my $self = bless {} => $class; |
48
|
32
|
|
|
|
|
142
|
$self->_initialize($arg_for); |
49
|
23
|
|
|
|
|
82
|
return $self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _croak { |
53
|
12
|
|
|
12
|
|
23
|
my ( $class, $message ) = @_; |
54
|
12
|
|
|
|
|
84
|
require Carp; |
55
|
12
|
|
|
|
|
2159
|
Carp::croak($message); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Curtis Poe, C<< >> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 BUGS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
65
|
|
|
|
|
|
|
C, or through the web interface at |
66
|
|
|
|
|
|
|
L. |
67
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
68
|
|
|
|
|
|
|
your bug as I make changes. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SUPPORT |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
perldoc App::Grepl::Base |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
You can also look for information at: |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=over 4 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * CPAN Ratings |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * Search CPAN |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=back |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Copyright 2007 Curtis Poe, all rights reserved. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
105
|
|
|
|
|
|
|
under the same terms as Perl itself. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |