summaryrefslogtreecommitdiff
path: root/modules/Driver.pm
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-02-27 14:10:18 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-02-27 14:10:18 +0000
commitb71c04a97399bf73d9ddb988e240622c7ad87364 (patch)
treecba3f5f6454c896cd23c0a6f1dd231e5745c4991 /modules/Driver.pm
parent2adc22883322ccd583f5da432f1d4db52f4cd43b (diff)
downloadMPC-b71c04a97399bf73d9ddb988e240622c7ad87364.tar.gz
Wed Feb 27 14:09:25 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'modules/Driver.pm')
-rw-r--r--modules/Driver.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/Driver.pm b/modules/Driver.pm
index 3b759156..1f963aa8 100644
--- a/modules/Driver.pm
+++ b/modules/Driver.pm
@@ -113,8 +113,19 @@ sub add_dynamic_creators {
if (opendir($fh, "$dir/modules")) {
foreach my $file (readdir($fh)) {
if ($file =~ /(.+$type)\.pm$/i) {
- $self->debug("Pulling in $1");
- push(@{$self->{'creators'}}, $1);
+ my $name = $1;
+ if ($^O eq 'VMS') {
+ my($fh) = new FileHandle();
+ if (open($fh, $dir . "/modules/" . $file)) {
+ my $line = <$fh>;
+ if ($line =~ /^\s*package\s+(.+);/) {
+ $name = $1;
+ }
+ close($fh);
+ }
+ }
+ $self->debug("Pulling in $name");
+ push(@{$self->{'creators'}}, $name);
}
}
closedir($fh);
@@ -122,7 +133,6 @@ sub add_dynamic_creators {
}
}
-
sub parse_line {
my($self) = shift;
my($ih) = shift;