diff options
Diffstat (limited to 'perl-install/c.pm')
| -rw-r--r-- | perl-install/c.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/c.pm b/perl-install/c.pm new file mode 100644 index 000000000..bb72118f6 --- /dev/null +++ b/perl-install/c.pm @@ -0,0 +1,19 @@ +package c; # $Id: c.pm 20589 2004-12-13 15:56:00Z tvignaud $ + +use vars qw($AUTOLOAD); + +use c::stuff; +use MDK::Common; + +sub AUTOLOAD() { + $AUTOLOAD =~ /::(.*)/ or return; + my @l = eval { &{$c::stuff::{$1}} }; + if (my $err = $@) { + $err =~ /Undefined subroutine &main::/ ? + die("can not find function $AUTOLOAD\n" . backtrace()) : + die($err); + } + wantarray() ? @l : $l[0]; +} + +1; |
