From ec82169c91789d3de1f2075b9fd8c6d99758eff5 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Sun, 16 Aug 2009 12:44:53 +0200 Subject: [PATCH] Change videosite-dl.pl to work with changed module naming --- videosite-dl.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/videosite-dl.pl b/videosite-dl.pl index 642b162..8b1b161 100755 --- a/videosite-dl.pl +++ b/videosite-dl.pl @@ -24,13 +24,13 @@ sub ploader { foreach $p (@list) { $p =~ s/\.pm$//; - eval qq{ require $p; }; + eval qq{ require videosite::$p; }; if ($@) { print("Failed to load plugin: $@"); next; } - $g = eval $p.q{->new();}; + $g = eval qq{ videosite::$p->new();}; if ($@) { print("Failed to instanciate: $@"); delete($INC{$p}); @@ -59,6 +59,7 @@ my $bp; # This is some dark magic to find out our real base directory, # where we hope to find our plugins. $bp = File::Spec->catdir(dirname(realpath($0)), 'videosite'); +unshift(@INC, dirname(realpath($0))); @g = ploader($bp, '.*Grabber\.pm$', 'grabber'); ($f) = ploader($bp, '^FileGetter\.pm$', 'getter'); -- 1.8.3.1