]> iEval git - gruntmaster-data.git/blame_incremental - Gruntmaster/App/Command.pm
Bump version and update Changes
[gruntmaster-data.git] / Gruntmaster / App / Command.pm
... / ...
CommitLineData
1package Gruntmaster::App::Command;
2
3use 5.014000;
4use strict;
5use warnings;
6use re '/s';
7
8our $VERSION = '6000.001';
9
10use parent qw/App::Cmd::Command/;
11use Pod::Usage;
12
13sub description {
14 my ($self) = @_;
15 my ($file) = (ref $self) =~ s,::,/,gr;
16 my $usage;
17 open my $fh, '>', \$usage; ## no critic (RequireCheckedOpen)
18 pod2usage(-input => $INC{"$file.pm"}, -output => $fh, -exitval => 'NOEXIT', -verbose => 99, -sections => [qw/SYNOPSIS DESCRIPTION/]);
19 close $fh; ## no critic (RequireCheckedClose)
20 $usage =~ s/Usage:/Usage examples:/;
21 1 while chomp $usage;
22 $usage
23}
24
251;
26__END__
27
28=encoding utf-8
29
30=head1 NAME
31
32Gruntmaster::App::Command - Base class for gm commands
33
34=head1 SYNOPSIS
35
36 package Gruntmaster::App::Command::foo;
37 use Gruntmaster::App '-command';
38
39=head1 DESCRIPTION
40
41Gruntmaster::App::Command is the base class of all gm commands. Its
42only role is to extract a command's documentation from its POD by
43overriding the description method to use L<Pod::Usage>.
44
45=head1 SEE ALSO
46
47L<Gruntmaster::App>, L<gm>
48
49=head1 AUTHOR
50
51Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
52
53=head1 COPYRIGHT AND LICENSE
54
55Copyright (C) 2014-2016 by Marius Gavrilescu
56
57This library is free software; you can redistribute it and/or modify
58it under the same terms as Perl itself, either Perl version 5.20.1 or,
59at your option, any later version of Perl 5 you may have available.
60
61
62=cut
This page took 0.02161 seconds and 4 git commands to generate.