From: kj on
In <87zkz12gfe.fsf(a)quad.sysarch.com> "Uri Guttman" <uri(a)StemSystems.com> writes:

>and the IO::Scalar docs disagree with your call:

> new [ARGS...]
> Class method. Return a new, unattached scalar handle. If any
> arguments are given, they're sent to open().

> open [SCALARREF]
> Instance method. Open the scalar handle on a new scalar, pointed
> to by SCALARREF. If no SCALARREF is given, a "private" scalar is
> created to hold the file data.

> Returns the self object on success, undefined on error.

>so you aren't even calling it correctly.

I'm using IO::String, not IO::Scalar. My IO::String docs says:

$io = IO::String->new
$io = IO::String->new( $string )
The constructor returns a newly-created "IO::String"
object. It takes an optional argument, which is the
string to read from or write into. ...

As I described in the post before this one, what led me down the
wrong path was how I was determining the value of wantarray within
the debugger.

Thanks for your comments!

~K
From: Ilya Zakharevich on
On 2010-06-14, kj <no.email(a)please.post> wrote:
> Well, it looks that it's one of those. To determine the calling
> context I was halting the execution within the READLINE method,
> and then printing the value of wantarray from the debugger prompt
> like this:
>
> DB<1> p wantarray
> 1
>
> Apparentely, in the debugger "p wantarray" always produces this
> result, irrespective of the value of wantarray in the executing
> program.

Sure, how else would it be? `p' evaluates its expression in list context...

Yours,
Ilya
From: kj on
In <slrni1e45m.n7i.nospam-abuse(a)powdermilk.math.berkeley.edu> Ilya Zakharevich <nospam-abuse(a)ilyaz.org> writes:

>On 2010-06-14, kj <no.email(a)please.post> wrote:
>> Well, it looks that it's one of those. To determine the calling
>> context I was halting the execution within the READLINE method,
>> and then printing the value of wantarray from the debugger prompt
>> like this:
>>
>> DB<1> p wantarray
>> 1
>>
>> Apparentely, in the debugger "p wantarray" always produces this
>> result, irrespective of the value of wantarray in the executing
>> program.

>Sure, how else would it be? `p' evaluates its expression in list context...

Yes, in retrospect I see that what I was doing is pretty dumb.