develooper Front page | perl.perl6.users | Postings from September 2017

what am I doing wrong here?

Thread Next
From:
ToddAndMargo
Date:
September 14, 2017 05:41
Subject:
what am I doing wrong here?
Message ID:
f5c91762-3b81-b344-e541-1e36f7152bc2@zoho.com
<code>
#!/usr/bin/env perl6

# Reference: https://docs.perl6.org/type/CallFrame

for 1..* -> $level {
     given callframe($level) -> $frame {
         when $frame ~~ CallFrame {
             next unless $frame.code ~~ Routine;
             say $frame.code.package;
             last;
         }
         default {
             say "no calling routine or method found";
             last;
         }
     }
}
</code>


$ CallFrameTest.pl6
Died with X::Multi::NoMatch
   in block  at ./CallFrameTest.pl6 line 8
   in block <unit> at ./CallFrameTest.pl6 line 5


Who called X::Multi::NoMatch?  And zef has no record of it.

I pulled this out of the example  on

https://docs.perl6.org/type/CallFrame


Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About