>-----Original Message-----
        >From:  Peter Eisengrein [SMTP:[EMAIL PROTECTED]]
        >Sent:  Wednesday, May 24, 2000 18:41
        >To:    'Bellenger, Bruno (Paris)'; '[EMAIL PROTECTED]'
        >Subject:       RE: character string length
        >
        >Thanks. I'm pretty sure that it is a dos problem, or, more likely a
code
        >problem on my part. I would have liked to have written the html
table-maker
        >script as a .pm but I'm afraid I'm still too much of a newbie to
know how.
        >It would work fine as a sub{} within the script itself (probably
faster
        >too), but I'd like to use this with other scripts. Can you point me
in the
        >right direction to learn to write a module? Or am I off-track with
that too?
        >
        >Thanks.

        Keep posting to the list so that all can contribute help on your new
questions.
        In fact, you may not need to build a module yourself to do this.
        A 'require' statement might be all you need here.

        Here's what Perldoc says about it :

        C:\>perldoc -q require
        Found in C:\Perl\5.005\lib/pod/perlfaq8.pod
         What's the difference between require and use?

           Perl offers several different ways to include code from
           one file into another. Here are the deltas between the
           various inclusion constructs:

            1) do $file is like eval `cat $file`, except the former:
             1.1: searches @INC and updates %INC.
             1.2: bequeaths an *unrelated* lexical scope on the eval'ed
code.

            2) require $file is like do $file, except the former:
             2.1: checks for redundant loading, skipping already loaded
files.
             2.2: raises an exception on failure to find, compile, or
execute $file.

            3) require Module is like require "Module.pm", except the
former:
             3.1: translates each "::" into your system's directory
separator.
             3.2: primes the parser to disambiguate class Module as an
indirect object.

            4) use Module is like require Module, except the former:
             4.1: loads the module at compile time, not run-time.
             4.2: imports symbols and semantics from that package to the
current one.

           In general, you usually want `use' and a proper Perl
           module.


About building modules, see below some of this year's post about the matter.

Also have a look at 
http://world.std.com/~swmcd/steven/perl/
http://world.std.com/~swmcd/steven/perl/module_mechanics.html
http://www.pconline.com/~erc/perlmod.htm

Check 
http://www.perl.com/CPAN-local/doc/manual/html/pod/perlmodlib.html
too, and look for 'Modules: Creation, Use, and Abuse' in it.

Hope this helps !

Cheers.

_____________________________________________
Bruno Bellenger
Sr. Network/Systems Administrator 



        
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

        -----Original Message-----
        From:   Kenneth Bandes [SMTP:[EMAIL PROTECTED]]
        Sent:   Sunday, January 16, 2000 17:46
        To:     Perl-Win32-Users Mailing List
        Subject:        Re: Modules

        Ankit wrote:
        > Does someone have a link to a good tutorial or a FAQ on Modules?Is
it easy
        > to learn about modules?someone i know quit perl when he couldn't
grasp
        > modules.Please send me a good link.thanks

        I recommend "Tom's Object-Oriented Tutorial" by Tom Christiansen.
This
        is included with your Perl distribution as perltoot.  Check out the
        on-line docs from the start menu.

        Ken Bandes



        -----Original Message-----
        From:   Ned Konz [SMTP:[EMAIL PROTECTED]]
        Sent:   Friday, April 07, 2000 17:29
        To:     Perl-Win32-Users Mailing List
        Cc:     Perl-Win32-Users Mailing List
        Subject:        Re: Creating Modules

        [EMAIL PROTECTED] wrote:

        > Sorry to bother everyone but can someone direct me to
documentation on how
        > to create a module?  Maybe module is not the right word.  I want
to be able
        > to access a set of global functions that I can store in one file
and use in
        > another file.  Thanks.

        try:
                perldoc perlmod

        and/or:
                perldoc perlmodlib

        -- 
        Ned Konz
        currently: Stanwood, WA
        email:     [EMAIL PROTECTED]
        homepage:  http://www.bike-nomad.com



---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to