Arc Forumnew | comments | leaders | submitlogin
2 points by vrk 6151 days ago | link | parent

Pardon the tangent, but in Perl 5 what you call the instance of the class is up to you. Conventionally it's $self, and the constructor is often new(), but these can be whatever you want. Unless you use a special CPAN module that does the work for you, the common idiom in declaring methods is

  sub method {
    my $self = shift;
    ...
  }
You could name it $myself, $this, or even $the_object if you wanted.