Help for this page

Select Code to Download


  1. or download this
    package Foo;
    sub new
    ...
    {
      print "This is the correlation function!";
    }
    
  2. or download this
      my $x = new Foo(method => 'biscuit');
    
  3. or download this
      if exists $self->{funcs}{$self->{method}}
      {
    ...
      {
        die "Sorry, the method $self->{method} isn't valid!";
      }
    
  4. or download this
      #This says "Not a CODE referece at Foo.pm line..."
      $self->{funcs}{correlation} = \&$self->correlation;
    ...
      #And this says "Scalar found where operator expected at
      # Foo.pm line...
      $self->{funcs}{correlation} = \&($self->correlation);