From 58d6aff8f61b5c41e6e58ddc27cf661a359b341e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 17 Nov 2012 15:59:00 -0500 Subject: [PATCH] scripts aren't classes, so use anon package instead --- lib/WebGUI/Upgrade/File/pl.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Upgrade/File/pl.pm b/lib/WebGUI/Upgrade/File/pl.pm index cbaba978b..c1a78628f 100644 --- a/lib/WebGUI/Upgrade/File/pl.pm +++ b/lib/WebGUI/Upgrade/File/pl.pm @@ -18,7 +18,7 @@ WebGUI::Upgrade::File::pl - Upgrade class for Perl scripts package WebGUI::Upgrade::File::pl; use Moose; -use Class::MOP::Class; +use Class::MOP::Package; use File::Spec::Functions qw(devnull); use Scope::Guard; use namespace::autoclean -also => qr/^_/; @@ -52,9 +52,9 @@ sub _runScript { local *_; # use an anonymous package for this code. the namespace will # automatically be deleted when this goes out of scope. - my $anon_class = Class::MOP::Class->create_anon_class; + my $anon_package = Class::MOP::Package->create_anon; my $wanted = wantarray; - eval sprintf(<<'END_CODE', $anon_class->name); + eval sprintf(<<'END_CODE', $anon_package->name); package %s; # maintain context if ($wanted) {