in reply to Need a quick file check/checkout script if anyone has a moment. :)

sub install { use Cvs; my $cvs = new Cvs ( '/path/to/repository/for/module', cvsroot => ':pserver:user@host:/path/to/cvs', password => 'secret' ) or die $Cvs::ERROR; $cvs->checkout('module'); use perl::net::utils; } eval "use perl::net::utils" or &install;

The CPAN docs for CVS can provide more info ...


If anyone needs me I'll be in the Angry Dome.
  • Comment on Re: Need a quick file check/checkout script if anyone has a moment. :)
  • Download Code

Replies are listed 'Best First'.
Re^2: Need a quick file check/checkout script if anyone has a moment. :)
by tachyon (Chancellor) on Oct 01, 2004 at 01:21 UTC

    The use in the sub also needs to be wrapped in an eval or Perl will find it at compile time and barf if the module is not installed. You could use a require + call import.

    cheers

    tachyon