Skip to content

Instantly share code, notes, and snippets.

@lucs
Created February 27, 2017 15:44
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 lucs/dd83de28db51228e7f2c2f5878eb00c2 to your computer and use it in GitHub Desktop.
Save lucs/dd83de28db51228e7f2c2f5878eb00c2 to your computer and use it in GitHub Desktop.
With $foo, an object obtained with Inline::Perl5, 「say $foo.perl」 gives:
Inline::Perl5::Perl5Object.new(
ptr => NativeCall::Types::Pointer.new(191831688),
perl5 => Inline::Perl5.new
)
In Perl 5, 「$foo->{bar}」 returns an expected value, but in Perl 6,
「$foo<bar>」 gives:
Type Inline::Perl5::Perl5Object does not support associative indexing.
@b2gills
Copy link

b2gills commented Mar 2, 2017

To be fair, you generally shouldn't be mucking about in an object's internals like that.

Also an object in Perl 5 is created by blessing a reference, and that reference can be to anything including arrays and even to a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment