|
From: <jgr...@us...> - 2003-06-29 21:02:50
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv906/Classifier
Modified Files:
MailParse.pm
Log Message:
debug is a private member variable
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -d -r1.140 -r1.141
*** MailParse.pm 26 Jun 2003 14:09:00 -0000 1.140
--- MailParse.pm 29 Jun 2003 21:02:47 -0000 1.141
***************
*** 229,233 ****
$self->{msg_total__} += 1;
! print "--- $word ($self->{words__}{$word})\n" if ($self->{debug});
}
--- 229,233 ----
$self->{msg_total__} += 1;
! print "--- $word ($self->{words__}{$word})\n" if ($self->{debug__});
}
***************
*** 296,300 ****
$after = '&' if ( $after eq '>' );
if ( !( $self->{ut__} =~ s/($before)\Q$word\E($after)/$1<b><font color=\"$color\">$word<\/font><\/b>$2/ ) ) {
! print "Could not find $word for colorization\n" if ( $self->{debug} );
}
} else {
--- 296,300 ----
$after = '&' if ( $after eq '>' );
if ( !( $self->{ut__} =~ s/($before)\Q$word\E($after)/$1<b><font color=\"$color\">$word<\/font><\/b>$2/ ) ) {
! print "Could not find $word for colorization\n" if ( $self->{debug__} );
}
} else {
***************
*** 324,328 ****
my $p = 0;
! print "add_line: [$bigline]\n" if $self->{debug};
# If the line is really long then split at every 1k and feed it to the parser below
--- 324,328 ----
my $p = 0;
! print "add_line: [$bigline]\n" if $self->{debug__};
# If the line is really long then split at every 1k and feed it to the parser below
***************
*** 363,367 ****
$line =~ s/$from/$to/g;
$self->{ut__} =~ s/$from/$to/g;
! print "$from -> $to\n" if $self->{debug};
}
}
--- 363,367 ----
$line =~ s/$from/$to/g;
$self->{ut__} =~ s/$from/$to/g;
! print "$from -> $to\n" if $self->{debug__};
}
}
***************
*** 378,382 ****
$line =~ s/$from/$to/g;
$self->{ut__} =~ s/$from/$to/g;
! print "$from -> $to\n" if $self->{debug};
$self->update_pseudoword( 'html', 'numericentity', $encoded, $from );
}
--- 378,382 ----
$line =~ s/$from/$to/g;
$self->{ut__} =~ s/$from/$to/g;
! print "$from -> $to\n" if $self->{debug__};
$self->update_pseudoword( 'html', 'numericentity', $encoded, $from );
}
***************
*** 408,414 ****
my $original = "$1$2$4";
my $word = $2;
! print "$word ->" if $self->{debug};
$word =~ s/[^A-Z]//gi;
! print "$word\n" if $self->{debug};
$self->update_word( $word, $encoded, ' ', ' ', $prefix);
$self->update_pseudoword( 'trick', 'spacedout', $encoded, $original );
--- 408,414 ----
my $original = "$1$2$4";
my $word = $2;
! print "$word ->" if $self->{debug__};
$word =~ s/[^A-Z]//gi;
! print "$word\n" if $self->{debug__};
$self->update_word( $word, $encoded, ' ', ' ', $prefix);
$self->update_pseudoword( 'trick', 'spacedout', $encoded, $original );
***************
*** 464,468 ****
$arg =~ s/[\r\n]//g;
! print "HTML tag $tag with argument " . $arg . "\n" if ($self->{debug});
# End tags do not require any argument decoding but we do look at them
--- 464,468 ----
$arg =~ s/[\r\n]//g;
! print "HTML tag $tag with argument " . $arg . "\n" if ($self->{debug__});
# End tags do not require any argument decoding but we do look at them
***************
*** 515,524 ****
}
! print " attribute $attribute with value $quote$value$quote\n" if ($self->{debug});
# Remove leading whitespace and leading value-less attributes
if ( $arg =~ s/^(([ \t]*(\w+)[\t ]+)+)([^=])/$4/ ) {
! print " attribute(s) " . $1 . " with no value\n" if ($self->{debug});
}
--- 515,524 ----
}
! print " attribute $attribute with value $quote$value$quote\n" if ($self->{debug__});
# Remove leading whitespace and leading value-less attributes
if ( $arg =~ s/^(([ \t]*(\w+)[\t ]+)+)([^=])/$4/ ) {
! print " attribute(s) " . $1 . " with no value\n" if ($self->{debug__});
}
***************
*** 613,617 ****
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug} );
}
--- 613,617 ----
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
***************
*** 621,625 ****
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug} );
}
--- 621,625 ----
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
***************
*** 643,647 ****
$self->update_pseudoword( 'html', "backcolor$value" );
$self->{htmlbackcolor__} = map_color($self, $value);
! print "Set html back color to $self->{htmlbackcolor__}\n" if ( $self->{debug} );
$self->{htmlbodycolor__} = $self->{htmlbackcolor__} if ( $tag =~ /^body$/i );
--- 643,647 ----
$self->update_pseudoword( 'html', "backcolor$value" );
$self->{htmlbackcolor__} = map_color($self, $value);
! print "Set html back color to $self->{htmlbackcolor__}\n" if ( $self->{debug__} );
$self->{htmlbodycolor__} = $self->{htmlbackcolor__} if ( $tag =~ /^body$/i );
***************
*** 805,809 ****
if ( !defined( $host ) || ( $host eq '' ) ) {
! print "no hostname found: [$temp_url]\n" if ($self->{debug});
return '';
}
--- 805,809 ----
if ( !defined( $host ) || ( $host eq '' ) ) {
! print "no hostname found: [$temp_url]\n" if ($self->{debug__});
return '';
}
***************
*** 862,866 ****
$line =~ s/[\r\n]+//gm;
! print "parse_html: [$line] " . $self->{in_html_tag__} . "\n" if $self->{debug};
# Remove HTML comments and other tags that begin !
--- 862,866 ----
$line =~ s/[\r\n]+//gm;
! print "parse_html: [$line] " . $self->{in_html_tag__} . "\n" if $self->{debug__};
# Remove HTML comments and other tags that begin !
***************
*** 868,872 ****
while ( $line =~ s/(<!.*?>)// ) {
$self->update_pseudoword( 'html', 'comment', $encoded, $1 );
! print "$line\n" if $self->{debug};
}
--- 868,872 ----
while ( $line =~ s/(<!.*?>)// ) {
$self->update_pseudoword( 'html', 'comment', $encoded, $1 );
! print "$line\n" if $self->{debug__};
}
***************
*** 1011,1015 ****
next if ( !defined($line) );
! print ">>> $line" if $self->{debug};
if ($self->{color__}) {
--- 1011,1015 ----
next if ( !defined($line) );
! print ">>> $line" if $self->{debug__};
if ($self->{color__}) {
***************
*** 1043,1047 ****
$self->{in_headers__} = 0;
! print "Header parsing complete.\n" if $self->{debug};
next;
--- 1043,1047 ----
$self->{in_headers__} = 0;
! print "Header parsing complete.\n" if $self->{debug__};
next;
***************
*** 1081,1085 ****
if (!defined $2) {
! print "Hit MIME boundary --$1\n" if $self->{debug};
$self->{in_headers__} = 1;
} else {
--- 1081,1085 ----
if (!defined $2) {
! print "Hit MIME boundary --$1\n" if $self->{debug__};
$self->{in_headers__} = 1;
} else {
***************
*** 1089,1093 ****
my $boundary = $1;
! print "Hit MIME boundary terminator --$1--\n" if $self->{debug};
# escape to match escaped boundary characters
--- 1089,1093 ----
my $boundary = $1;
! print "Hit MIME boundary terminator --$1--\n" if $self->{debug__};
# escape to match escaped boundary characters
***************
*** 1109,1113 ****
$mime = ($temp_mime || '');
! print "MIME boundary list now $mime\n" if $self->{debug};
$self->{in_headers__} = 0;
}
--- 1109,1113 ----
$mime = ($temp_mime || '');
! print "MIME boundary list now $mime\n" if $self->{debug__};
$self->{in_headers__} = 0;
}
***************
*** 1201,1210 ****
$self->{base64__} =~ s/ //g;
! print "Base64 data: " . $self->{base64__} . "\n" if ($self->{debug});
$decoded = decode_base64( $self->{base64__} );
parse_html( $self, $decoded, 1 );
! print "Decoded: " . $decoded . "\n" if ($self->{debug});
$self->{ut__} = "<b>Found in encoded data:</b> " . $self->{ut__} if ( $self->{color__} );
--- 1201,1210 ----
$self->{base64__} =~ s/ //g;
! print "Base64 data: " . $self->{base64__} . "\n" if ($self->{debug__});
$decoded = decode_base64( $self->{base64__} );
parse_html( $self, $decoded, 1 );
! print "Decoded: " . $decoded . "\n" if ($self->{debug__});
$self->{ut__} = "<b>Found in encoded data:</b> " . $self->{ut__} if ( $self->{color__} );
***************
*** 1290,1294 ****
my ($self, $header, $argument, $mime, $encoding) = @_;
! print "Header ($header) ($argument)\n" if ($self->{debug});
if ( $self->{color__} ) {
--- 1290,1294 ----
my ($self, $header, $argument, $mime, $encoding) = @_;
! print "Header ($header) ($argument)\n" if ($self->{debug__});
if ( $self->{color__} ) {
***************
*** 1384,1388 ****
if ( $argument =~ /^(.*?)(;)/ ) {
! print "Set content type to $1\n" if $self->{debug};
$self->{content_type__} = $1;
}
--- 1384,1388 ----
if ( $argument =~ /^(.*?)(;)/ ) {
! print "Set content type to $1\n" if $self->{debug__};
$self->{content_type__} = $1;
}
***************
*** 1405,1409 ****
$mime = $boundary;
}
! print "Set mime boundary to " . $mime . "\n" if $self->{debug};
return ($mime, $encoding);
}
--- 1405,1409 ----
$mime = $boundary;
}
! print "Set mime boundary to " . $mime . "\n" if $self->{debug__};
return ($mime, $encoding);
}
***************
*** 1417,1421 ****
if ( $header =~ /^Content-Transfer-Encoding$/i ) {
$encoding = $argument;
! print "Setting encoding to $encoding\n" if $self->{debug};
my $compact_encoding = $encoding;
$compact_encoding =~ s/[^A-Za-z0-9]//g;
--- 1417,1421 ----
if ( $header =~ /^Content-Transfer-Encoding$/i ) {
$encoding = $argument;
! print "Setting encoding to $encoding\n" if $self->{debug__};
my $compact_encoding = $encoding;
$compact_encoding =~ s/[^A-Za-z0-9]//g;
|