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