Subj : Re: anyone know of a language where nonexistent functions return To : comp.programming From : Jonathan Bartlett Date : Fri Jul 22 2005 02:57 pm > So i'm intrigued now - what do folks use the feature for? Several things: a) delayed loading of large function libraries b) automatically create getter/setter functions for classes c) implement interesting APIs simply For example, with (c) you could create a class that used the UNIX shell as an API. Something like this (NOTE! Code not tested): package UnixShell; sub AUTOLOAD { my $name = our $AUTOLOAD; *$AUTOLOAD = sub { shift; $args = join(map { /* quote parameters here */ $_} @_, " "); $retval = `$name $args`; return $retval; } goto &$AUTOLOAD; } sub new { my ($class) = @_; my $self = {}; bless $self, $class; return $self; } Then you could do: use UnixShell; my $sh = UnixShell->new; $output = $sh->grep("johnnyb@eskimo.com", "/var/log/maillog"); You could probably implement a pretty good XMLRPC or SOAP wrapper like that, too. Jon ---- Learn to program using Linux assembly language http://www.cafeshops.com/bartlettpublish.8640017 .