Help for this page

Select Code to Download


  1. or download this
    my $sub = sub { ... };
    no strict 'refs';
    *{"Alex::Log::$name"} = $sub;
    
  2. or download this
    sub _doLog {
      my ($self, $lid, $pid, $msg) = @_;
    ...
                                       VALUES ( ?, ?, ? )" );
      $sth->execute( $lid, $pid, $msg );
    }
    
  3. or download this
    my $singleton;
    sub new {
    ...
    
      $singleton;
    );
    
  4. or download this
      foreach my $lev( @$levels ) {
        no strict 'refs';
    ...
          _doLog(@$lev, @_);
        };
      }
    
  5. or download this
    sub _doLog {
      my ($lid, $pid, $msg) = @_;
    ...
                                         VALUES ( ?, ?, ? )" );
      #...
    }
    
  6. or download this
    our @EXPORT_OK;
    use base 'Exporter';
    ...
      _init();
      goto \&Exporter::import;
    }
    
  7. or download this
      foreach my $lev( @$levels ) {
        push @EXPORT_OK, $lev->[1]; # set up the allowable exports
    ...
          _doLog(@$lev, @_);
        };
      }