The parser-trig.t and parser-turtle.t tests fail on blead perl since:
open my $fh, $how, \$scalar
has changed to treat the code-points in $scalar as the bytes read instead of returning whatever happens to be the internal representation.
It isn't clear from the documentation whether parse_from_model() and parse() are intended to accept characters or to accept bytes, this patch assumes they are intended to accept bytes and encodes the data before supplying it to parse_from_model().
An alternative pull request that assumes parse() accepts characters will also be submitted.
Thanks @tonycoz. I'm closing this as I think #81 aligns with my (and hopefully) users' expectations. I will see about documenting the expectations of the encoding of arguments to the parse methods.
The parser-trig.t and parser-turtle.t tests fail on blead perl since:
open my $fh, $how, \$scalar
has changed to treat the code-points in $scalar as the bytes read instead of returning whatever happens to be the internal representation.
It isn't clear from the documentation whether parse_from_model() and parse() are intended to accept characters or to accept bytes, this patch assumes they are intended to accept bytes and encodes the data before supplying it to parse_from_model().
An alternative pull request that assumes parse() accepts characters will also be submitted.
For more information on the change, see:
http://blogs.perl.org/users/tony_cook/2013/02/perl-io-on-scalars.html
and
https://rt.perl.org/rt3/Ticket/Display.html?id=109828