Convert-BulkDecoder
view release on metacpan or search on metacpan
lib/Convert/BulkDecoder.pm view on Meta::CPAN
_fill_crctab() unless @crctab || !$self->{crc};
my @lines = @$a;
my ($ydec_part, $ydec_line, $ydec_size, $ydec_name, $ydec_pcrc,
$ydec_begin, $ydec_end);
my $pcrc;
while ( $_ = shift(@lines) ) {
# Newlines a fakes and should not be decoded.
chomp;
s/\r//g;
# If we've started decoding $ydec_name will be set.
if ( !$ydec_name ) {
# Skip until beginning of yDecoded part.
next unless /^=ybegin/;
if ( / part=(\d+)/ ) {
$ydec_part = $1;
}
lib/Convert/BulkDecoder.pm view on Meta::CPAN
# Excellent.. We have determed all the info for this file we
# need.. Skip till next line, this should contain the real
# data.
next;
}
# Looking for the end tag.
if ( /^=yend/ ) {
# We are done.. Check the sanity of article.
# and unset $ydec_name in case that there are more
# ydecoded files in the same article.
$self->{result} = "OK";
if ( / part=(\d+)/ ) {
if ( $ydec_part != $1 ) {
die("Part number '$1' different from beginning part '$ydec_part'\n");
}
}
if ( / size=(\d+)/ ) {
# Check size, but first calculate it.
my $size;
if ( defined($ydec_part) ) {
( run in 0.397 second using v1.01-cache-2.11-cpan-26ccb49234f )