SPUG: class methods

Andrew Sweger andy at n2h2.com
Thu Jan 27 02:35:17 CST 2000

And to keep the VOLUME turned way up...

Please note that,



&Some::Package::method("Some::Package", @args);

are the same thing (if not, I'm sure I'll hear about it). They're exactly
the same thing. When you make the call using the first example, the class
(or package name) is passed to the function in that package as the first
argument in @_. Gah! Oh, that wasn't as clear on the second reading. Just
pretend, if you write it as in the first example, that it is magically
transformed into the second when it's executed.

Perl's object orientedness is merely syntactic sugar to help you more
easily think in terms of OO design.

Of course, if you've been using "->" and telling everyone that you're
really using "::", some people are going to talk about you behind your

"If you fork a child and don't reap them when they die, you end up with

  Andrew Sweger <andy at n2h2.com>  |  N2H2, Incorporated
  v=206.336.2947 f=206.336.1541  |  900 Fourth Avenue, Suite 3400
     Advanced Technologies       |  Seattle WA 98164-1059
          Development            |  http://www.n2h2.com/

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address

More information about the spug-list mailing list