On Tue, Jan 13, 2009 at 11:51:45PM -0800, Ovid wrote:
> ----- Original Message ----
> 
> > From: Moritz Lenz <mor...@faui2k3.org>
> 
> > Ovid wrote:
> > > OK, I'm tired of submitting bug reports.
> > 
> > Still bug reports are valuable. When you find your motivation again,
> > please continue to submit them.
> 
> I meant that I was tired "for that one evening".  I do plan to come back to 
> this :)
> 
> > > It's not a patch because I got tired of adding exceptions for bugs, but 
> > > then I 
> > realized that the bugs might be in my brain :)  Specifically, I started 
> > adding 
> > stuff like this because of lack of a .perl method:
> > > 
> > >       my $have = $passed.WHAT eq any()
> > >         ?? $passed
> > >         !! $passed.perl;
> > 
> > Maybe ``try({$passed.perl}) // ~$passed'' works better, I hope to find
> > tuits today to see if it makes a difference.
> 
> Does the try() block return the last evaluated value like Perl 5?

Yes.

> If so, what if $passed is undef but doesn't blow up?  

undef.perl should still be defined.

> Wouldn't that break this?

Afaict not. But there is another problem with it, this blows up:

./perl6 -e 'my $fh = open("README"); my $res = try { $fh.perl} ;'
 Null PMC access in isa()
current instr.: '!CALLMETHOD' pc 16769 (src/builtins/guts.pir:74)
called from Sub 'infix:=' pc 14108 (src/builtins/assign.pir:19)
called from Sub '_block14' pc 130 (EVAL_16:61)
called from Sub '!UNIT_START' pc 17255 (src/builtins/guts.pir:321)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950
(src/PCT/HLLCompiler.pir:527)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1496
(src/PCT/HLLCompiler.pir:787)
called from Sub 'parrot;Perl6;Compiler;main' pc 21006 (perl6.pir:158)

... for which I'll submit a bug report soon

Reply via email to