Skip to content

Instantly share code, notes, and snippets.

@moritz
Created August 10, 2011 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/1136753 to your computer and use it in GitHub Desktop.
Save moritz/1136753 to your computer and use it in GitHub Desktop.
Trouble with marshalling parrot backtraces into Perl 6 objects
try {
die 'foo';
}
# I'd expect a Parcel here,since .backtrace returns an RPA
my $p_bt =
pir::perl6ize_type__PP(
nqp::getattr(pir::perl6_decontainerize__PP($!), Exception, '$!ex').backtrace
);
# dies with Method 'gist' not found for invocant of class 'Hash'
# if run:
# say $p_bt;
# this one says 'Parcel':
pir::say pir::typeof__SP
nqp::getattr(pir::perl6_decontainerize__PP($!), Exception, '$!ex').backtrace;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment