line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::FileSummoner; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
834
|
$App::FileSummoner::VERSION = '0.005'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Makes file creation easier! |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
23
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
35
|
|
9
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
10
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
559
|
use App::FileSummoner::CreateFile; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
App::FileSummoner |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 run |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Main function - accepts @ARGV as parameter |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub run { |
27
|
|
|
|
|
|
|
my (@args) = @_; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
if (! @args) { |
30
|
|
|
|
|
|
|
print "Usage: create <file>\n"; |
31
|
|
|
|
|
|
|
exit; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $summoner = App::FileSummoner::CreateFile->new; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $action = 'summonFile'; |
37
|
|
|
|
|
|
|
foreach my $arg (@args) { |
38
|
|
|
|
|
|
|
if ($arg eq '-') { |
39
|
|
|
|
|
|
|
$action = 'summonFileToStdout'; |
40
|
|
|
|
|
|
|
next; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
$summoner->$action($arg); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Marian Schubert, C<< <marian.schubert at gmail.com> >> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 BUGS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Please report any bugs or feature requests to C<bug-file-skeleton at rt.cpan.org>, |
53
|
|
|
|
|
|
|
or through the web interface at |
54
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Skeleton>. I will be |
55
|
|
|
|
|
|
|
notified, and then you'll automatically be notified of progress on your bug as |
56
|
|
|
|
|
|
|
I make changes. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SUPPORT |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
perldoc App::FileSummoner |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
You can also look for information at: |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over 4 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Skeleton> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<http://annocpan.org/dist/File-Skeleton> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * CPAN Ratings |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/File-Skeleton> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * Search CPAN |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/File-Skeleton/> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Copyright 2011 Marian Schubert. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
97
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
98
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; # End of App::FileSummoner |