package c; # $Id: c.pm,v 1.1.1.1 2003/06/06 09:53:05 rider Exp $ use c::stuff; use MDK::Common; sub AUTOLOAD { $AUTOLOAD =~ /::(.*)/; my @l = eval { &{$c::stuff::{$1}} }; if (my $err = $@) { $err =~ /Undefined subroutine &main::/ ? die("can't find function $AUTOLOAD\n" . backtrace()) : die($err); } wantarray ? @l : $l[0]; } 1;