kasei / perlrdf

Deprecated in favor of the Attean package
26 stars 25 forks source link

pass encoded data into parse_from_model() #81

Closed tonycoz closed 11 years ago

tonycoz commented 11 years ago

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

kasei commented 11 years ago

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.