Michael G Schwern wrote:
> On Mon, Mar 31, 2003 at 12:28:28AM +0200, Rafael Garcia-Suarez wrote:
> > 142 is the number of elements in %ESCAPES, last var to be defined
> > in Pod::Man.
> >
> > As Dan said, this is a context problem :
> > (not sure how to turn this into a good regression test, though)
>
> The below looks more like 5.8.0 is doing the right thing. wantarray()
> should be undef.
Don't confuse me while I'm writing the summaries ;-)
looks like wantarray should always be "" (scalar context).
> So your test is easy. Write a small dummy module which has nothing in it
> but a hash. require it in an eval, see if $@ is set.
No, turn the thingy below in a test, with numbered and commented "ok"'s,
and without pain : (I'll look at it another day)
> > $ cat foo.pm
> > package foo;
> > print "wantarray:",defined wantarray ? wantarray : 'undef';
> > print "\n";
> > 1;
> > $ cat foo.t
> > $foo = eval q{require foo}; delete $INC{"foo.pm"};
> > @foo = eval q{require foo}; delete $INC{"foo.pm"};
> > eval q{require foo}; delete $INC{"foo.pm"};
> > $foo = eval {require foo}; delete $INC{"foo.pm"};
> > @foo = eval {require foo}; delete $INC{"foo.pm"};
> > eval {require foo}; delete $INC{"foo.pm"};
> > $ perl5.6.0 foo.t
> > wantarray:
> > wantarray:
> > wantarray:
> > wantarray:
> > wantarray:
> > wantarray:
> > $ perl5.8.0 foo.t
> > wantarray:
> > wantarray:
> > wantarray:undef
> > wantarray:
> > wantarray:
> > wantarray:
--
Unconvinced is not *NIX
Thread Previous
|
Thread Next