diff options
author | Larry Wall <larry@netlabs.com> | 1994-03-18 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1994-03-18 00:00:00 +0000 |
commit | 8990e3071044a96302560bbdb5706f3e74cf1bef (patch) | |
tree | 6cf4a58108544204591f25bd2d4f1801d49334b4 /lib/AutoLoader.pm | |
parent | ed6116ce9b9d13712ea252ee248b0400653db7f9 (diff) | |
download | perl-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.pm | 15 |
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; |