git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7730372
)
Change videosite-dl.pl to work with changed module naming
author
Ralf Ertzinger
<sun@fred.camperquake.de>
Sun, 16 Aug 2009 10:44:53 +0000
(12:44 +0200)
committer
Ralf Ertzinger
<sun@fred.camperquake.de>
Sun, 16 Aug 2009 10:44:53 +0000
(12:44 +0200)
videosite-dl.pl
patch
|
blob
|
history
diff --git
a/videosite-dl.pl
b/videosite-dl.pl
index
642b162
..
8b1b161
100755
(executable)
--- a/
videosite-dl.pl
+++ b/
videosite-dl.pl
@@
-24,13
+24,13
@@
sub ploader {
foreach $p (@list) {
$p =~ s/\.pm$//;
foreach $p (@list) {
$p =~ s/\.pm$//;
- eval qq{ require $p; };
+ eval qq{ require
videosite::
$p; };
if ($@) {
print("Failed to load plugin: $@");
next;
}
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});
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');
# 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');
@g = ploader($bp, '.*Grabber\.pm$', 'grabber');
($f) = ploader($bp, '^FileGetter\.pm$', 'getter');