summaryrefslogtreecommitdiff
path: root/lib/AutoLoader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AutoLoader.pm')
-rw-r--r--lib/AutoLoader.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm
new file mode 100644
index 0000000000..dba8ca2f5f
--- /dev/null
+++ b/lib/AutoLoader.pm
@@ -0,0 +1,15 @@
+package AutoLoader;
+
+AUTOLOAD {
+ my $name = "auto/$AUTOLOAD.al";
+ $name =~ s#::#/#g;
+ eval {require $name};
+ if ($@) {
+ ($p,$f,$l) = caller($AutoLevel);
+ $@ =~ s/ at .*\n//;
+ die "$@ at $f line $l\n";
+ }
+ goto &$AUTOLOAD;
+}
+
+1;