Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

geoff (2013)

  reversethis-{gro ... om} {ta} {ffoeg}

see [] for personal information, links to presentations, GPG key, and so on.

Journal of geoff (2013)

Tuesday December 24, 2002
11:01 AM

Perl as modules

[ #9615 ]
so I'm doing a proposal review for (yet another) generic Perl book (actually, it would be repackage of one that's already out there, but everyone needs to go through the motions anyway). one of the things that struck me while looking over the TOC was that the chapter on file handling discusses Perl's built-in functions almost exclusively - modules like IO::File are left to a chapter on standard modules.

When I really sat down to analyze this, it actually bothered me quite a bit (though it's not the author's fault). Are there any books that teach Perl as a language and include standard modules from the start? Do they discuss localtime right alongside the core Time:: modules, core Text:: with string manipulation, Test:: with "how to write a Perl program"? I admit it's been a very long time since I've actually looked at a beginning Perl book, but making core modules just an aside seemed like a real disservice to novices all of a sudden.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Sorry for late replies, but I'm still catching up with the holidays....

    Similar thoughts occurred to me. I'm coaching a beginner in Perl. We've done all the usual stuff, files, arrays, hashes, matches, regexes etc. and I'm just wondering when and how to introduce modules. IMHO most books leave it too late - and drop it in just when the reader is starting to feel confident and WHAM! - but put it in too early when the reader is just beginning to understand and WHAM!WHAM!
    I also think it is a mistake to tie it
    • yeah, it's a difficult topic to describe well. I've heard that Sam Tregar's Writing Perl Modules for CPAN [] does a good job, but I've not yet read it.

      and yes, modules do not (necessarily) equal OO. A good example is File::Spec which provides both functional and OO interfaces. modules as libraries is really the direction I was headed - for OO stuff Object-Oriented Perl is the best resource and there's no reason to try and repeat that work again.