line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Faker::Module; |
2
|
|
|
|
|
|
|
# ABSTRACT: a faked module |
3
|
|
|
|
|
|
|
$Module::Faker::Module::VERSION = '0.022'; |
4
|
8
|
|
|
8
|
|
58
|
use Moose; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
with 'Module::Faker::Appendix'; |
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
52746
|
use Module::Faker::Package; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
1616
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has filename => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
isa => 'Str', |
12
|
|
|
|
|
|
|
required => 1, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has packages => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
isa => 'ArrayRef[Module::Faker::Package]', |
18
|
|
|
|
|
|
|
required => 1, |
19
|
|
|
|
|
|
|
auto_deref => 1, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub as_string { |
23
|
|
|
|
|
|
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $string = ''; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my @packages = $self->packages; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
for ($packages[0]) { |
30
|
|
|
|
|
|
|
$string .= sprintf "\n=head1 NAME\n\n%s - %s\n\n=cut\n\n", |
31
|
|
|
|
|
|
|
$_->name, $_->abstract // 'a cool package'; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
for my $pkg ($self->packages) { |
35
|
|
|
|
|
|
|
$string .= $pkg->as_string . "\n"; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$string .= "1\n"; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
8
|
|
|
8
|
|
58
|
no Moose; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
40
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding UTF-8 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Module::Faker::Module - a faked module |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
version 0.022 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Ricardo Signes <rjbs@cpan.org> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This software is copyright (c) 2008 by Ricardo Signes. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
67
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |