ext/DynaLoader/hints/openbsd.pl Hint for DynaLoader for named architecture
ext/DynaLoader/Makefile.PL Dynamic Loader makefile writer
ext/DynaLoader/README Dynamic Loader notes and intro
+ext/DynaLoader/t/XSLoader.t See if XSLoader works
ext/DynaLoader/XSLoader_pm.PL Simple XS Loader perl module
ext/Encode/AUTHORS List of authors
ext/Encode/bin/enc2xs Encode module generator
package XSLoader;
-# And Gandalf said: 'Many folk like to know beforehand what is to
-# be set on the table; but those who have laboured to prepare the
-# feast like to keep their secret; for wonder makes the words of
-# praise louder.'
-
-# (Quote from Tolkien sugested by Anno Siegel.)
-#
-# See pod text at end of file for documentation.
-# See also ext/DynaLoader/README in source tree for other information.
-#
-# Tim.Bunce@ig.co.uk, August 1994
-
-$VERSION = "0.01"; # avoid typo warning
+$VERSION = "0.02";
# enable debug/trace messages from DynaLoader perl code
# $dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
!defined(&dl_error);
package XSLoader;
-1; # End of main code
-
-# The bootstrap function cannot be autoloaded (without complications)
-# so we define it here:
-
sub load {
package DynaLoader;
+ die q{XSLoader::load('Your::Module', $Your::Module::VERSION)} unless @_;
+
my($module) = $_[0];
# work with static linking too
goto &DynaLoader::bootstrap_inherit;
}
+1;
+
__END__
=head1 NAME
package YourPackage;
use XSLoader;
- XSLoader::load 'YourPackage', @args;
+ XSLoader::load 'YourPackage', $YourPackage::VERSION;
=head1 DESCRIPTION
--- /dev/null
+#!/usr/bin/perl -w
+
+BEGIN {
+ chdir 't';
+# @INC = '../lib';
+}
+
+use Test;
+plan tests => 4;
+
+use XSLoader;
+ok(1);
+ok( ref XSLoader->can('load') );
+
+eval { XSLoader::load(); };
+ok( $@ =~ /^XSLoader::load\('Your::Module', \$Your::Module::VERSION\)/ );
+
+package SDBM_File;
+XSLoader::load('SDBM_File');
+::ok( ref SDBM_File->can('TIEHASH') );