[Pdx-pm] Getting Started with CPAN

Noj nojunkster at gmail.com
Mon Jun 11 19:32:04 PDT 2007


I've messed around with Perl for awhile, but I keep running into Perl
Module Hell.  I'll spend a few hours/days trying to figure out CPAN,
but it always seems less trouble to rewrite stuff from scratch than
find that initial foothold on the CPAN climbing wall.  Frustratingly,
all the material on it seems to take for granted that you already know
CPAN and/or how to customize a makefile.  I want to do things the
'right' way, but I can't find a path up.

I keep seeing the phrase (sarcastic?) 'an easy install from CPAN', but
when I tried running CPAN (most recently on a vanilla MacOS X Tiger),
typed something like 'install XML::Parser' at the 'cpan>' prompt, it
just keep saying things like 'depends on [some other module],
prepend?', then lots of stuff scrolls by, and it asks to prepend
another module, sometimes a newer version of the same packages, and
finally wraps it up with a 'install failed' after 5+ minutes of this.
Then I see some reference to using sudo, and warnings some packages
would clobber existing stuff in /usr/bin if there was a name conflict,
so change the default directory in the makefile, etc etc.  Seems
pretty dodgy.

Is there any reference page on how to just get something like
XML::Parser working on a vanilla MacOS X Tiger?  Can I get some advice
on how to learn CPAN without already knowing how to use CPAN?

Most immediately, I'm trying to open a UTF-8 XML file.  If I read it
using 'while (<>)', I get junk.  This is perl, v5.8.6 built for
darwin-thread-multi-2level.  Am I on the right track trying to use
XML::Parser?

Thanks in Advance.

Noj


More information about the Pdx-pm-list mailing list