Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

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

Let's take things ong at a time, eh? I think you're going to want explainations in basic terms, and that's what I'm good at -- writing things in painfully terse form :)

* What is a module? - A module is basically a collection of subrouties that is not a program by itself, but is used by other programs. It's all about code recuse and astetics. The calling program accesses and uses the subrouting inside the module.

* How do i use it - You just said it: use module_name; or require module_name; Use and Require are similar but have different nuances, so 'use' would be your best bet. Put 'em up near the begining of the program.

* What is CPAN? - CPAN: A networked storage system of Perl Modules. It combines the Storage of the modules, managment and instalation into come seamless package. When people say 'use CPAN', they usually mean do (as root usually) "perl -MCPAN -e shell", which gets you into the CPAN shell where you can install perl modules with a few keystrokes. You want to install NET::IRC? Just type 'install NET::IRC'. It's very slick.

Module != CPAN. You can write you own modules in your own code, and I recommend that you do. CPAN is just a repostory of Generic and useful modules other people have written.

* how does it tie into a module - If you write a module that is usful enough that others would like it, you can bundle it up and put it on the CPAN network for other people to use.

* is their someplace here that can teach me all about modules and using them? - Here would be a great place to start. Using modules is pretty easy, you've probably already seen it/done it and not even known it. Making modules is harder, but worth learning if you want to write high-quality code.


In reply to Re: What are Modules by xunker
in thread What are Modules by ddrumguy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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 admiring the Monastery: (4)
As of 2024-04-19 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found