Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Trying to learn how to build a module

by Yoda (Sexton)
on Feb 02, 2001 at 20:23 UTC ( [id://56013]=note: print w/replies, xml ) Need Help??


in reply to Re: Trying to learn how to build a module
in thread Trying to learn how to build a module

Thanks! All three answers helped out. I built my constructor correctly and added the shifts into the two functions. I now get the desired output! Is there a benefit to using a constructor and object reference over just using the module and calling the functions directly Module::funct()?

I can probably find the answer in perltoot.
  • Comment on Re: Re: Trying to learn how to build a module

Replies are listed 'Best First'.
Re: Re: Re: Trying to learn how to build a module
by davorg (Chancellor) on Feb 02, 2001 at 20:25 UTC

    Objects have associated instance data as well as methods. This means that you can create many objects and they can each have a different set of data associated with them. In your example, each object could have a different name.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      Thanks! You have been a lot of help.

      Yoda

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56013]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found