Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Also:   “Yay!!   This is open source!   Therefore, you can see for yourself!”   :-)

Simply look-up any of those modules on http://search.cpan.org, then click on the Source hyperlink at the top of the page, next to the version-number.   Presto:   there’s the source.   Wanna know what they did and how they did it?   There are no secrets.   Wanna look at the test-suite that runs anytime the package is installed on a computer?   No secrets.

Now, you might well have stumbled-upon a package which is actually part of another package, such that “the source” actually consists of the whole package.   Well, there’s a hyperlink to that, too ... closer yet to the top of the page, next to the author’s name.

The source-code to any installed package can also be found in the library directories of your computer.   The PERL5LIB environment-variable (or its equivalent, found in some control-panel, in Windows), will tell you where.

Some libraries actually use a combination of “pure Perl” and C/C++ subroutines, in a technique called “XS.”   Nevertheless, all the relevant source-code should be right there, along with the “magick glue” that links the two together.

While you’re getting-to-know Perl, another “must have” CPAN module (family ...) to be aware of is:   Regexp::Common.   (Definitely “click next to the author’s name” on this one!   It’s big!)   A library of many hundreds of commonly-used regular expressions, all of them well-tested so that you don’t have to.

Although it is, indeed, very educational to “learn from the working examples of others,” it’s also important to “do not do a thing already done.”   CPAN-provided solutions are frequently very thorough, very complete, and very tested.   One might cautiously say that “the Perl language, itself,” is rather ordinary . . . but “the CPAN library” is one of the biggest-and-best in our industry.   “What’s all the fuss about, really?”   To me, the answer is:   CPAN.   Learn it well, use it often.

Welcome to the Monastery!




  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found