xmltv/lib Options.pm,1.26,1.27
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/lib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv440
Modified Files:
Options.pm
Log Message:
Add --info (synonym --man) option to print extended help information from grabber's POD
Index: Options.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Options.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Options.pm 16 Dec 2013 15:28:46 -0000 1.26
--- Options.pm 21 Jan 2014 10:32:19 -0000 1.27
***************
*** 4,7 ****
--- 4,11 ----
use warnings;
+ # use version number for feature detection:
+ # 0.005065 : added --info / --man option (prints POD and then exits)
+ our $VERSION = 0.005065;
+
BEGIN {
use Exporter ();
***************
*** 42,115 ****
capabilities
description
/],
baseline => [qw/
! days=i
! offset=i
! quiet
! output=s
! debug
! config-file=s
! /],
manualconfig => [qw/configure/],
apiconfig => [qw/
! configure-api
! stage=s
! list-channels
! /],
tkconfig => [qw/gui=s/],
# The cache option is normally handled by XMLTV::Memoize
# but in case it is not used, we handle it here as well.
cache => [qw/
! cache:s
! /],
share => [qw/
! share=s
! /],
preferredmethod => [qw/
! preferredmethod
! /],
! lineups => [qw/
! get-lineup
! list-lineups
! /],
);
my %cap_defaults = (
! all => {
! capabilities => 0,
! help => 0,
! version => 0,
! },
! baseline => {
! quiet => 0,
! days => 5,
! offset => 0,
! output => undef,
! debug => 0,
! gui => undef,
! },
! manualconfig => {
! configure => 0,
! },
! apiconfig => {
! 'configure-api' => 0,
! stage => 'start',
! 'list-channels' => 0,
! },
! tkconfig => {
! },
! cache => {
! cache => undef,
! },
! share => {
! share => undef,
! },
! preferredmethod => {
! preferredmethod => 0,
},
! lineups => {
! 'get-lineup' => 0,
! 'list-lineups' => 0,
! }
);
--- 46,123 ----
capabilities
description
+ info
+ man
/],
baseline => [qw/
! days=i
! offset=i
! quiet
! output=s
! debug
! config-file=s
! /],
manualconfig => [qw/configure/],
apiconfig => [qw/
! configure-api
! stage=s
! list-channels
! /],
tkconfig => [qw/gui=s/],
# The cache option is normally handled by XMLTV::Memoize
# but in case it is not used, we handle it here as well.
cache => [qw/
! cache:s
! /],
share => [qw/
! share=s
! /],
preferredmethod => [qw/
! preferredmethod
! /],
! lineups => [qw/
! get-lineup
! list-lineups
! /],
);
my %cap_defaults = (
! all => {
! capabilities => 0,
! help => 0,
! version => 0,
! info => 0,
! man => 0,
! },
! baseline => {
! quiet => 0,
! days => 5,
! offset => 0,
! output => undef,
! debug => 0,
! gui => undef,
! },
! manualconfig => {
! configure => 0,
! },
! apiconfig => {
! 'configure-api' => 0,
! stage => 'start',
! 'list-channels' => 0,
! },
! tkconfig => {
},
! cache => {
! cache => undef,
! },
! share => {
! share => undef,
! },
! preferredmethod => {
! preferredmethod => 0,
! },
! lineups => {
! 'get-lineup' => 0,
! 'list-lineups' => 0,
! }
);
***************
*** 159,162 ****
--- 167,172 ----
=item --help
+ =item --info (or --man)
+
=item --capabilities
***************
*** 427,430 ****
--- 437,454 ----
exit 0;
}
+ elsif( $opt->{info} || $opt->{man} )
+ {
+ # pod2usage(-verbose => 2) doesn't work under Windows xmltv.exe (since it needs perldoc)
+ if ($^O eq 'MSWin32')
+ {
+ require Pod::Text;
+ Pod::Text->new (sentence => 0, margin => 2, width => 78)->parse_from_file($0);
+ }
+ else
+ {
+ require Pod::Usage; import Pod::Usage; pod2usage(-verbose => 2);
+ }
+ exit 0;
+ }
XMLTV::Ask::init($opt->{gui});
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk