Initial commit
[app-zealc.git] / lib / App / Zealc / Command.pm
CommitLineData
6c01e3e3
MG
1package App::Zealc::Command;
2
3use 5.014000;
4use strict;
5use warnings;
6
7our $VERSION = '0.000_001';
8
9use parent qw/App::Cmd::Command/;
10use App::Zealc::UsageExtractor;
11
12sub description {
13 my ($self) = @_;
14 my ($file) = (ref $self) =~ s,::,/,gr;
15 my $parser = App::Zealc::UsageExtractor->new;
16 $parser->parse_file($INC{"$file.pm"});
17 return $parser->usage
18}
19
201;
21__END__
22
23=encoding utf-8
24
25=head1 NAME
26
27App::Zealc::Command - Base class for zealc commands
28
29=head1 SYNOPSIS
30
31 package App::Zealc::Command::foo;
32 use App::Zealc '-command';
33
34=head1 DESCRIPTION
35
36App::Zealc::Command is the base class of all zealc commands. Its only
37role is to supply a default C<description> method that extracts the
38SYNOPSIS and DESCRIPTION sections using L<App::Zealc::UsageExtractor>.
39
40=head1 SEE ALSO
41
42L<App::Zealc::UsageExtractor>, L<zealc>, L<Zeal>
43
44=head1 AUTHOR
45
46Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
47
48=head1 COPYRIGHT AND LICENSE
49
50Copyright (C) 2015 by Marius Gavrilescu
51
52This library is free software; you can redistribute it and/or modify
53it under the same terms as Perl itself, either Perl version 5.20.1 or,
54at your option, any later version of Perl 5 you may have available.
55
56
57=cut
This page took 0.011452 seconds and 4 git commands to generate.