Skip to content

Commit

Permalink
Item14237: Executing user-defined method on a temporary object of spe…
Browse files Browse the repository at this point in the history
…cial class.
  • Loading branch information
vrurg committed May 25, 2017
1 parent 1e2ee3b commit 53ed2ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/lib/Foswiki/Config/Spec/Format/perl.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# See bottom of file for license and copyright information

package Foswiki::Config::Spec::Format::perl::Wrapper;

use Foswiki::Class qw(app);
extends qw(Foswiki::Object);
with qw(Foswiki::Config::CfgObject);

package Foswiki::Config::Spec::Format::perl;

use Foswiki::Exception::Config;
Expand Down Expand Up @@ -31,7 +37,10 @@ SPECCODE
);
}

return $sub->($this);
my $wrapper = $this->create( 'Foswiki::Config::Spec::Format::perl::Wrapper',
cfg => $this->cfg, );

return $sub->($wrapper);
}

1;
Expand Down

0 comments on commit 53ed2ac

Please sign in to comment.