package ; require Exporter; require DynaLoader; require AutoLoader; $VERSION = ''; @ISA = qw(Exporter DynaLoader); @EXPORT_OK = qw( ); %EXPORT_TAGS = ( ); sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() # XS function. If a constant is not found then control is passed # to the AUTOLOAD in AutoLoader. # NOTE: THIS AUTOLOAD FUNCTION IS FLAWED (but is the best we can do for now). # Avoid old-style ``&CONST'' usage. Either remove the ``&'' or add ``()''. if (@_ > 0) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } local($constname); ($constname = $AUTOLOAD) =~ s/.*:://; $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { if(errtype()==2) { # spelling? ($pack,$file,$line) = caller; die "Unknown constant $constname in $file, line $line. If you need this constant, please edit `/.def' and add it at the end. Then, go to the directory, and regenerate the extension by typing `make install'. (You might need root privs.) If you think this constant should be supplied by default then contact the perl5 developers (or leave a message on comp.lang.perl). "; } elsif (errtype()==3) { # disabled ($pack,$file,$line) = caller; die " constant $constname, used in $file, line $line, is explicitly disabled. Please read the file `/.def' which may contain more information. "; } elsif (errtype()==1) { # missing includes ($pack,$file,$line) = caller; die " constant $constname used at $file, line $line is not available. If you know which header file to include, you can edit `/.def' and then regenerate the extension by typing `make install'. (You might need root privs.) "; } else { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } ->bootstrap($VERSION); # Preloaded methods go here. # Autoload methods go after __END__, and are processed by the autosplit program. 1; __END__