[VPM] Ubuntu + CPAN ?

Peter Scott Peter at PSDT.com
Wed Oct 10 12:38:48 PDT 2007


At 10:30 AM 10/10/2007, Lloyd Budd wrote:
>Hi,
>
>So here I am dabbling in a little Perl code trying to do a simple
>Atompub::Client [1] app.
>
>This is the my first experience needing anything more than the built
>in libraries, and there are a lot of unmet dependencies, so I'm a
>little intimidated by CPAN.
>
>I'm using Ubuntu 7.04, is there a method/tool to automate install the
>libraries that are availabe as Ubuntu packags, and only use CPAN for
>the ones that aren't?

I don't think you want or need to mix and match approaches.  CPAN 
really is a piece of cake once you set it up initially and there are 
zillions of modules that make it easy.  Once you've answered the 
initial questions all you should have to do is type 'cpan Atompub::Client'.

To get set up, just type 'cpan' to begin with.  Depending on whether 
it's been used before, it'll either give you a prompt or take you 
through setup.  Odds are you'll see:

   If you prefer to enter a dialog instead, you can answer 'no' to this
   question and I'll let you configure in small steps one thing after the
   other. (Note: you can revisit this dialog anytime later by typing 'o
   conf init' at the cpan prompt.)
   Would you like me to configure as much as possible automatically? [yes]

Hit return.  Continue hitting return for all the prompts, except when 
it asks you whether it shoulw automatically follow dependencies - I 
type 'follow' there.  When it gives you a list of URLs, I usually pick 
US sites at pair.com and perl.com; others will doubtless chime in with 
favourites.  This takes only a minute.  Then you're done; type 'quit' 
and then you can do 'cpan Atompub::Client'.  It'll pull in all the 
dependencies that you don't have, which I figured out below with a 
program that comes with the module CPAN::Dependency:

$ cpandeps Atompub::Client
Atompub::Client (T/TA/TAKERU/Atompub-0.2.2.tar.gz)
   DateTime (D/DR/DROLSKY/DateTime-0.41.tar.gz)
     Test::More (M/MS/MSCHWERN/Test-Simple-0.72.tar.gz)
       Test::Harness (P/PE/PETDANCE/Test-Harness-2.64.tar.gz)
         File::Spec (K/KW/KWILLIAMS/PathTools-3.25.tar.gz)
     Scalar::Util (G/GB/GBARR/Scalar-List-Utils-1.19.tar.gz)
     DateTime::TimeZone (D/DR/DROLSKY/DateTime-TimeZone-0.68.tar.gz)
       Class::Singleton (A/AB/ABW/Class-Singleton-1.4.tar.gz)
       Params::Validate (D/DR/DROLSKY/Params-Validate-0.88.tar.gz)
         Attribute::Handlers (A/AB/ABERGMAN/Attribute-Handlers-0.78.tar.gz)
       Pod::Man (R/RR/RRA/podlators-2.0.5.tar.gz)
         Pod::Simple (A/AR/ARANDAL/Pod-Simple-3.05.tar.gz)
           Pod::Escapes (S/SB/SBURKE/Pod-Escapes-1.04.tar.gz)
           constant (S/SA/SAPER/constant-1.11.tar.gz)
           Text::Wrap (M/MU/MUIR/modules/Text-Tabs+Wrap-2006.1117.tar.gz)
     DateTime::Locale (D/DR/DROLSKY/DateTime-Locale-0.35.tar.gz)
     Time::Local (D/DR/DROLSKY/Time-Local-1.17.tar.gz)
   URI::Escape (G/GA/GAAS/URI-1.35.tar.gz)
   HTTP::Status (G/GA/GAAS/libwww-perl-5.808.tar.gz)
   Class::Accessor::Fast (K/KA/KASEI/Class-Accessor-0.31.tar.gz)
     base (R/RG/RGARCIA/base-2.12.tar.gz)
   Test::Perl::Critic 
(T/TH/THALJEF/testperlcritic/Test-Perl-Critic-1.01.tar.gz)
   Class::Data::Inheritable (T/TM/TMTM/Class-Data-Inheritable-0.06.tar.gz)
   XML::Atom::Service (T/TA/TAKERU/XML-Atom-Service-0.15.4.tar.gz)
     version (J/JP/JPEACOCK/version-0.73.tar.gz)
     XML::Atom (M/MI/MIYAGAWA/XML-Atom-0.27.tar.gz)
       MIME::Base64 (G/GA/GAAS/MIME-Base64-3.07.tar.gz)
   File::Slurp (U/UR/URI/File-Slurp-9999.12.tar.gz)
   Module::Build::Compat (K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz)
     ExtUtils::Install (M/MS/MSCHWERN/ExtUtils-Install-1.44.tar.gz)
       ExtUtils::MakeMaker (M/MS/MSCHWERN/ExtUtils-MakeMaker-6.36.tar.gz)
       File::Path (D/DL/DLAND/File-Path-2.01.tar.gz)
     ExtUtils::Manifest (R/RK/RKOBES/ExtUtils-Manifest-1.51.tar.gz)
     Getopt::Long (J/JV/JV/Getopt-Long-2.37.tar.gz)
       Pod::Usage (M/MA/MAREKR/Pod-Parser-1.35.tar.gz)
     IO::File (G/GB/GBARR/IO-1.2301.tar.gz)
     Data::Dumper (I/IL/ILYAM/Data-Dumper-2.121.tar.gz)
   Digest::SHA1 (G/GA/GAAS/Digest-SHA1-2.11.tar.gz)
   MIME::Types (M/MA/MARKOV/MIME-Types-1.21.tar.gz)
     Test::Pod (P/PE/PETDANCE/Test-Pod-1.26.tar.gz)
   Class::Accessor::Lvalue::Fast 
(R/RC/RCLAMP/Class-Accessor-Lvalue-0.11.tar.gz)
     Want (R/RO/ROBIN/Want-0.15.tar.gz)
   DateTime::Format::W3CDTF (K/KE/KELLAN/DateTime-Format-W3CDTF-0.04.tar.gz)
   Perl6::Export::Attrs (D/DC/DCONWAY/Perl6-Export-Attrs-0.0.3.tar.gz)

Holy cow.  But at least cpan will install them automatically.
-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
http://www.perlmedic.com/



More information about the Victoria-pm mailing list