On 14 Dec 2017, at 9:14 (-0500), Dianne Skoll wrote:
On Wed, 13 Dec 2017 20:37:36 -0500
"Bill Cole" <mdlist-20140...@billmail.scconsult.com> wrote:
- return IO::File->new(\ $self->{MBS_Data}, $mode);
+ return IO::Scalar->new(\ $self->{MBS_Data}, $mode);
This will cause other problems down the line. I suggest you
study the section "Byte and Character Semantics" in the perlunicode
man page.
Thanks for the reference and for your patience with my confusion. I
understand much better now: anything expressed as a string has to make
sense as a series of encoded characters, not a series of bytes.
And as `strings PerlIO/scalar/scalar.bundle` says: "Strings with code
points over 0xFF may not be mapped into in-memory file handles"
Modern Perl does let you open a "file" by passing a reference
to a scalar; it has built-in in-memory I/O.
Indeed. I was fooled by the fact that deep inside the 'open' call stack,
both $! and $^E get set to "No such file or directory" but that's
because XSLoader looks for a .bs while loading PerlIO::scalar...
I couldn't find exactly where the "Invalid Argument" error (and matching
numeric errno) is being generated, since it's in a debug-resistant
return that pops 4 stack layers in one step, but I'm perfectly happy to
believe that it's buried in PerlIO/scalar/scalar.bundle and is entirely
proper.
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Currently Seeking Steady Work: https://linkedin.com/in/billcole
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang