Skip to content

Instantly share code, notes, and snippets.

@niner
Created June 13, 2016 19:11
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 niner/9dcfde064e1914bb36951e013107a69c to your computer and use it in GitHub Desktop.
Save niner/9dcfde064e1914bb36951e013107a69c to your computer and use it in GitHub Desktop.
diff --git a/lib/Inline/Perl5.pm6 b/lib/Inline/Perl5.pm6
index f2ef5c2..c2c18f0 100644
--- a/lib/Inline/Perl5.pm6
+++ b/lib/Inline/Perl5.pm6
@@ -730,7 +730,7 @@ role Perl5Package[Inline::Perl5 $p5, Str $module] {
if (self.perl.Str ne $module) { # subclass
%args<parent> = $p5.invoke($module, 'new', |@args, |%args.kv);
my $self = self.bless();
- $self.BUILDALL(%args);
+ $self.BUILDALL(@args, %args);
return $self;
}
else {
@@ -743,6 +743,10 @@ role Perl5Package[Inline::Perl5 $p5, Str $module] {
$p5.rebless($parent, 'Perl6::Object', self) if $parent;
}
+ multi method BUILDALL(@args, %args) {
+ self.BUILDALL(%args) # compatibility with rakudo post commit 4179bdc7dcdd2e6cb8fca5b21197e6babceaca55
+ }
+
method unwrap-perl5-object() {
$!parent;
}
@@ -950,7 +954,11 @@ role Perl5Parent[Str:D $package, Inline::Perl5:D $perl5] {
has $!parent;
method new(:$parent?, *@args, *%args) {
- self.CREATE.initialize-perl5-object($parent, @args, %args).BUILDALL(%args);
+ self.CREATE.initialize-perl5-object($parent, @args, %args).BUILDALL(@args, %args);
+ }
+
+ multi method BUILDALL(@args, %args) {
+ self.BUILDALL(%args) # compatibility with rakudo post commit 4179bdc7dcdd2e6cb8fca5b21197e6babceaca55
}
method initialize-perl5-object($parent, @args, %args) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment