Help for this page

Select Code to Download


  1. or download this
    package Original;
    
    sub new {
    ...
        my $self = shift;
        return $self->new($self);
    }
    
  2. or download this
    sub new {
        my $class = shift;
        my $self = _init(@_);    # private method
    ...
        my $self = shift;
        return $self->new($self);    # pass this as a hash ref
    }
    
  3. or download this
    sub copy {
        my $self = shift;
        my $new = __SUPER__->init($self->new($self));
        return $new;
    }