Help for this page

Select Code to Download


  1. or download this
        my $object = bless($reference, "MyClass");
    
  2. or download this
        sub bless {
          my ($reference, $class) = @_;
          $reference->{class_name} = $class;
          return $reference;
        }
    
  3. or download this
        $object->some_function($arg1);
    
  4. or download this
        $object->{class_name}::some_function($object, $arg1);
    
  5. or download this
        MyClass::some_function($object, $arg1);