home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / ppm_install < prev    next >
Encoding:
Text File  |  2003-09-10  |  3.3 KB  |  121 lines

  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. # use warnings;
  5. use Getopt::Long qw(:config no_ignore_case auto_version auto_help);
  6. use Pod::Usage;
  7. $main::VERSION = $PPM::Make::VERSION;
  8. use PPM::Make::Install;
  9. my %opts = ();
  10. my @files = ();
  11. my %progs = ();
  12. GetOptions(\%opts, 
  13.            'ignore|i',
  14.            'remove|r',
  15.            'force|f',
  16.            'no_case',
  17.            'upgrade',
  18.           ) or pod2usage(2);
  19.  
  20. my $dist = shift;
  21. $opts{dist} = $dist if $dist;
  22.  
  23. my $ppm = PPM::Make::Install->new(%opts);
  24. $ppm->make_ppm();
  25. $ppm->ppm_install();
  26.  
  27. __END__
  28.  
  29. =head1 NAME
  30.  
  31. ppm_install - build and install a distribution via ppm
  32.  
  33. =head1 SYNOPSIS
  34.  
  35.  ppm_install [options] [Module | Distribution]
  36.  
  37. Options:
  38.  
  39.  [--version]          : print version information and exit
  40.  [--help]             : print this help screen
  41.  [-r | --remove]      : remove the build directory after installation
  42.  [-i | --ignore]      : ignore any failing test results
  43.  [-f | --force]       : force remaking a distribution
  44.  [--no_case]          : for module searches, ignore case
  45.  [--upgrade]          : upgrade via ppm
  46.  [--program]  b=a     : specify "a" to be used for the "b" program
  47.  
  48. Additional Arguments:
  49.  
  50.    Module       : specify a module to fetch (requires CPAN.pm)
  51.    Distribution : specify a distribution to fetch
  52.  
  53. With no arguments, ppm_install will install a distribution
  54. inside the current directory.
  55.  
  56. =head1 DESCRIPTION
  57.  
  58. C<ppm_install> is an interface to the C<PPM::Make::Install> module,
  59. and is used to build a PPM (Perl Package Manager) distribution
  60. from a CPAN source distribution and then install it with 
  61. the C<ppm> utility. See L<PPM::Make> for a discussion.
  62.  
  63. Apart from the options described below, without any arguments 
  64. C<ppm_install> will assume it is inside an unpacked source
  65. distribution and make the corresponding PPM distribution.
  66. If it is given an argument of what looks like a module
  67. name (eg, I<Net::FTP>), it will use C<CPAN.pm> to look up the 
  68. corresponding distribution and fetch and build it. Otherwise, 
  69. additional arguments (eg, F<package.tar.gz>, or
  70. I<http://someplace.org/package.tar.gz>) will be interpreted
  71. as distributions to fetch and build.
  72.  
  73. =over
  74.  
  75. =item [-i | --ignore]
  76.  
  77. By default, C<ppm_install>, if it is building the distribution,
  78. will die if all tests do not pass. Turning on this option
  79. instructs C<ppm_install> to ignore any test failures.
  80.  
  81. =item [-r | --remove]
  82.  
  83. If specified, the directory used to build the ppm distribution
  84. given on the command line will be removed after a successful install.
  85.  
  86. =item [-f | --force]
  87.  
  88. By default, if C<ppm_install> detects a F<blib/> directory,
  89. it will assume the distribution has already been made, and
  90. will not remake it. This option forces remaking the distribution.
  91.  
  92. =item [--no_case]
  93.  
  94. If specified, module searches will be performed in a case-insensitive
  95. manner.
  96.  
  97. =item [--upgrade]
  98.  
  99. Will do an upgrade of the specified package, if applicable.
  100.  
  101. =item [--help]
  102.  
  103. This prints out a short help screen and exits.
  104.  
  105. =item [--version]
  106.  
  107. This prints out some version information and exits.
  108.  
  109. =back
  110.  
  111. =head1 COPYRIGHT
  112.  
  113. This program is copyright, 2003, by Randy Kobes <randy@theoryx5.uwinnipeg.ca>.
  114. It is distributed under the same terms as Perl itself.
  115.  
  116. =head1 SEE ALSO
  117.  
  118. L<PPM::Make>, and L<PPM>.
  119.  
  120. =cut
  121.