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.bat < prev    next >
Encoding:
DOS Batch File  |  2003-11-13  |  3.7 KB  |  137 lines

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