/usr/share/perl5/XMLTV/Version.pm is in libxmltv-perl 0.5.70-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | =head1 NAME
XMLTV::Version - Adds a --version argument to XMLTV grabbers
=head1 DESCRIPTION
Add a --version argument to your program, eg
use XMLTV::Version '$Id: Version.pm,v 1.3 2010/04/24 12:28:22 crispygoth Exp $';
If a --version parameter is supplied on the command-line, it will
be caught already by the "use" statement, a message will be printed
to STDOUT and the program will exit.
It is best to put the use XMLTV::Version statement before other module
imports, so that even if they fail --version will still work.
=head1 SEE ALSO
L<XMLTV::Options>
=cut
package XMLTV::Version;
my $opt = '--version';
sub import( $$ ) {
die "usage: use $_[0] <version-string>" if @_ != 2;
my $seen = 0;
foreach (@ARGV) {
# This doesn't handle abbreviations in the GNU style.
last if $_ eq '--';
if ($_ eq $opt) {
$seen++ && warn "seen '$opt' twice\n";
}
}
return if not $seen;
eval {
require XMLTV;
print "XMLTV module version $XMLTV::VERSION\n";
};
print "could not load XMLTV module, xmltv is not properly installed\n"
if $@;
for ($_[1]) {
if (m!\$Id: ([^,]+),v (\S+) ([0-9/: -]+)!) {
print "This is $1 version $2, $3\n";
}
else {
print "This program version $_\n";
}
}
exit();
}
1;
|