sub load_plugins { my($class) = @_; my $dir = $class->conf_directory(); foreach my $file (sort glob("$dir/*.pm")) { $class->load_plugin_file($file); } } sub load_plugin_file { my($class, $file) = @_; # ... eval { require $file; }; # ... }
sub load_plugins { my($class) = @_; my $dir = $class->conf_directory(); foreach my $file (sort glob("$dir/*.pm")) { $class->load_plugin_file($file); } } sub load_plugin_file { my($class, $file) = @_; # ... eval { require $file; }; # ... }