summaryrefslogtreecommitdiff
path: root/lib/AutoLoader.pm
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
commit8990e3071044a96302560bbdb5706f3e74cf1bef (patch)
tree6cf4a58108544204591f25bd2d4f1801d49334b4 /lib/AutoLoader.pm
parented6116ce9b9d13712ea252ee248b0400653db7f9 (diff)
downloadperl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just like the last commit]
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;