Help for this page

Select Code to Download


  1. or download this
    package Cats;
    sub new { bless {}, shift } # generic constructor ;)
    sub purring { $self = shift; $self->{key} = "foos" };
    
  2. or download this
    my $self = Cats->new;
    $self->pruring; # will set the key, since $_[0] is $self
    Cats->purring;  # will treat the invocant ("Cats") as a hashref, since
    + $_[0] is the package name