SPUG:Prototyping Subroutines in Class(Objects)

Don Shanks dshanks at u.washington.edu
Wed Feb 5 11:23:53 CST 2003

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

More information about the spug-list mailing list