App-SpamcupNG

 view release on metacpan or  search on metacpan

lib/App/SpamcupNG/HTMLParse.pm  view on Meta::CPAN

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
my $wanted = ( split( ':', $content ) )[1];
$wanted =~ s/^\s+//;
my @wanted = split( ';', $wanted );
 
if ( scalar(@wanted) > 1 ) {
    my $encoding = lc( $wanted[0] );
    my $charset  = lc( $wanted[1] );
    $charset =~ s/^\s+//;
    $charset =~ tr/"//d;
 
    my $not_useful = 'boundary';
 
    if (
        substr( $charset, 0, length($not_useful) ) eq
        $not_useful )
    {
        $info{content_type} = $encoding;
        $info{charset}      = undef;
    }
    else {
        $info{content_type} = $encoding;
        $info{charset}      = ( split( '=', $charset ) )[1];
    }
}
else {



( run in 0.249 second using v1.01-cache-2.11-cpan-26ccb49234f )