/usr/share/perl5/Debbugs/DBase/LogEntry.pm is in libdebbugs-perl 2.6.0.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # TODO: Implement 'stale' checks, so that there is no need to explicitly
# write out a record, before closing.
package Debbugs::DBase::LogEntry;
use strict;
sub new
{
my $self = {};
# $self->{LOG} = new FileHandle;
# $self->{AGE} = undef;
# $self->{PEERS} = [];
$self->{log} = [];
$self->{Load} = &Load;
bless ($self);
return $self;
}
my %logClass = ();
my %logType = ();
sub Load
{
my ($self, $handle) = (shift, shift);
foreach (keys %$self) {
print "key=$_\n";
}
while (<$handle>) {
chomp;
my ($char, $class, $type) = ($_, $logClass{ $_ }, $logType{ $_ });
my $msg = "";
while (<$handle>) {
chomp;
if ( $_ eq "\3" ) {
last;
} else {
$msg .= "$_\n";
}
}
if( defined($class) ) {
print "found handler $type for $char\n";
my $log = $class->new($msg);
my @log = $self->{log};
push @log, ($log);
} else {
print "undefined handler for $char\n";
}
}
}
BEGIN {
use Exporter ();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(new);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = qw();
}
1;
|