~ubuntu-branches/ubuntu/saucy/libmodule-info-perl/saucy

« back to all changes in this revision

Viewing changes to bin/module_info

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2007-07-03 13:02:51 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070703130251-a3lwdwadryajtfkk
Tags: 0.31-1
* New upstream release
* Bumped policy version to 3.7.2.2 (No other changes)
* Build-Depends-Indep to Build-Depends to satisfy lintian
* Changed debian/rules so that make clean is only conditionally ignored

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
Equivalent to C<-s -p -m>.
37
37
 
 
38
=back
 
39
 
38
40
=head1 AUTHOR
39
41
 
40
 
Mattia Barbon <MBARBON@cpan.org>
 
42
Mattia Barbon <mbarbon@cpan.org>
41
43
 
42
44
=head1 SEE ALSO
43
45
 
49
51
use Module::Info;
50
52
use Getopt::Long;
51
53
 
52
 
my( $show_subroutines, $show_modules, $show_packages, $show_all );
 
54
my( $show_subroutines, $show_modules, $show_packages, $show_all, $help );
53
55
 
54
56
GetOptions( 's' => \$show_subroutines,
55
57
            'p' => \$show_packages,
56
58
            'm' => \$show_modules,
57
59
            'a' => \$show_all,
 
60
            'h' => \$help,
58
61
          );
59
62
 
 
63
if( $help || !@ARGV ) {
 
64
    print <<EOT;
 
65
Usage: module_info [-a] [-s] [-p] [-m] MODULE|FILE...
 
66
 
 
67
    -a Equivalent to -s -p -m
 
68
    -h Help message
 
69
    -m Show modules use()d by the module
 
70
    -p Show packages created by the module
 
71
    -s Show subroutines created by the module
 
72
EOT
 
73
    exit 0;
 
74
}
 
75
 
60
76
$show_subroutines ||= $show_all;
61
77
$show_modules ||= $show_all;
62
78
$show_packages ||= $show_all;