EBook-FB2

 view release on metacpan or  search on metacpan

lib/EBook/FB2/Binary.pm  view on Meta::CPAN

    if (@nodes) {
        $self->id($nodes[0]->getValue());
    }

    @nodes = $node->findnodes('@content-type');
    if (@nodes) {
        $self->content_type($nodes[0]->getValue());
    }

    # XXX: eval this, it might fail with invalid data
    my $decoded = MIME::Base64::decode($node->string_value());
    $self->data($decoded)
}

1;

__END__
=head1 NAME

EBook::FB2::Binary

=head1 SYNOPSIS

lib/EBook/FB2/Binary.pm  view on Meta::CPAN

=head1 SUBROUTINES/METHODS

=over 4

=item id()

Returns id of binary element

=item data()

Returns content of binary element (base64-decoded)

=item content_type()

Returns content-type of binary element

=back

=head1 AUTHOR

Oleksandr Tymoshenko, E<lt>gonzo@bluezbox.comE<gt>



( run in 0.545 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )