Help for this page

Select Code to Download


  1. or download this
    sub new {
            my $proto = shift;
    ...
            bless ($self, $class);
            return $self;
    }
    
  2. or download this
    sub file {
            my $self = shift;
    ...
                    $self->{file} = shift;
            }
    }
    
  3. or download this
    sub _common {
            my $self = shift;
    ...
                    $self->{$key}->($self) if defined $self->{$key};
            }
    }
    
  4. or download this
    sub _common {
            my $self = shift;
            my $key  = shift;
    # ...
    
  5. or download this
    sub pre {
            my $self = shift;
            $self->_common(pre => @_);
    }
    # etc.
    
  6. or download this
            $self->pre();
            open my $fh, '<', $self->{file} or croak "could not open $self
    +->{file}: $!";
    ...
                    ++$self->{count};
            }
            $self->post();
    
  7. or download this
                    my %data = $self->loop();
                    @{$self->{hash}{keys %data}} = values %data;
                    $count += scalar keys %data;