Bifcode

 view release on metacpan or  search on metacpan

lib/Bifcode.pm  view on Meta::CPAN

Your data contained a UTF8 string with an invalid length.

=item Bifcode::Error::DecodeUTF8Trunc

Your data includes a string declared to be longer than the available
data.

=item Bifcode::Error::DecodeUTF8Term

Your data includes a UTF8 string that is missing a "," terminator.

=item Bifcode::Error::DecodeUsage

You called C<decode_bifcode()> with invalid arguments.

=item Bifcode::Error::DiffUsage

You called C<diff_bifcode()> with invalid arguments.

=item Bifcode::Error::EncodeBytesUndef

You attempted to encode C<undef> as a byte string.

=item Bifcode::Error::EncodeFloat

You attempted to encode something as a float that isn't recognised as
one.

=item Bifcode::Error::EncodeFloatUndef

You attempted to encode C<undef> as a float.

=item Bifcode::Error::EncodeInteger

You attempted to encode something as an integer that isn't recognised
as one.

=item Bifcode::Error::EncodeIntegerUndef

You attempted to encode C<undef> as an integer.

=item Bifcode::Error::EncodeUTF8Undef

You attempted to encode C<undef> as a UTF8 string.

=item Bifcode::Error::EncodeUnhandled

You are trying to serialise a data structure that contains a data type
not supported by the I<bifcode> format.

=item Bifcode::Error::EncodeUsage

You called C<encode_bifcode()> with invalid arguments.

=item Bifcode::Error::ForceUsage

You called C<force_bifcode()> with invalid arguments.

=back

=head1 BUGS AND LIMITATIONS

Strings and numbers are practically indistinguishable in Perl, so
C<encode_bifcode()> has to resort to a heuristic to decide how to
serialise a scalar. This cannot be fixed.

At the moment all Perl hash keys are encoded as BIFCODE_UTF8 as I have
not yet had the need for BIFCODE_BYTES keys or found a cheap, obvious
way to distinguish the two.

=head1 SEE ALSO

This distribution includes the L<diff-bifcode> command-line utility for
comparing Bifcodes in files.

=head1 AUTHOR

Mark Lawrence <nomad@null.net>, heavily based on Bencode by Aristotle
Pagaltzis <pagaltzis@gmx.de>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c):

=over

=item * 2015 by Aristotle Pagaltzis

=item * 2017-2018 by Mark Lawrence.

=back

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.



( run in 1.293 second using v1.01-cache-2.11-cpan-df04353d9ac )