aboutsummaryrefslogtreecommitdiff
path: root/lib/Example/Foobar.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Example/Foobar.pm')
-rw-r--r--lib/Example/Foobar.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Example/Foobar.pm b/lib/Example/Foobar.pm
index 3ba4824..05ec036 100644
--- a/lib/Example/Foobar.pm
+++ b/lib/Example/Foobar.pm
@@ -57,11 +57,7 @@ sub new {
my $modpath = $modname;
$modpath =~ s{::}{/}g;
$modpath .= '.pm';
- my $cmd;
- eval {
- require $modpath;
- $cmd = $modname->new(@args);
- };
+ my $cmd = eval { require $modpath; $modname->new(@args) };
if ($@) {
if ($@ =~ /Can't locate $modpath/) {
die "unknown command: $command\n"

Return to:

Send suggestions and report system problems to the System administrator.