SPUG:Prototyping Subroutines in Class(Objects)

Pommert, Daniel Daniel.Pommert at VerizonWireless.com
Thu Feb 6 18:00:07 CST 2003

(At least as of 5.005) Prototypes are ignored for method calls.  Your syntax
implies that you are calling these as object methods.  Perhaps this has
changed with 5.008 that just came out.  Anybody know?

-- Daniel Pommert

-----Original Message-----
From: Don Shanks [mailto:dshanks at u.washington.edu]
Sent: Wednesday, February 05, 2003 9:24 AM
To: Spug (E-mail)
Subject: SPUG:Prototyping Subroutines in Class(Objects)

Here's a question: What is the proper way to prototype a subroutine that
exists within an object or class?

sub foo($$) {
  my $self = shift;
  my $bar = shift;


sub foo ($) {
  my $self = shift;
  my $bar = shift;

Does it matter if you prototype the class object since it is passed
whether you want to or not, or is this just a matter of style?

Don Shanks
Cell Systems Inititative/University of Washington
dshanks at u.washington.edu

Seattle Perl Users Group Mailing List  
POST TO: spug-list at mail.pm.org
ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
MEETINGS: 3rd Tuesdays, U-District, Seattle WA
WEB PAGE: www.seattleperl.org

More information about the spug-list mailing list