package List::Util;
require Exporter;
+require DynaLoader;
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(first min max minstr maxstr reduce sum);
-$VERSION = $VERSION = "1.02";
+our @ISA = qw(Exporter DynaLoader);
+our @EXPORT_OK = qw(first min max minstr maxstr reduce sum);
+our $VERSION = "1.02";
-eval {
- require DynaLoader;
- local @ISA = qw(DynaLoader);
- bootstrap List::Util $VERSION;
- 1
-};
+bootstrap List::Util $VERSION;
1;
require Exporter;
require List::Util; # List::Util loads the XS
-$VERSION = $VERSION = $List::Util::VERSION;
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly);
-
-sub export_fail {
- if (grep { /^(weaken|isweak)$/ } @_ ) {
- require Carp;
- Carp::croak("Weak references are not implemented in the version of perl");
- }
- if (grep { /^dualvar$/ } @_ ) {
- require Carp;
- Carp::croak("dualvar is only avaliable with the XS version");
- }
-
- @_;
-}
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly);
+our $VERSION = $List::Util::VERSION;
1;
If EXPR is a scalar which is a weak reference the result is true.
+=item readonly SCALAR
+
+Returns true if SCALAR is readonly.
+
=item reftype EXPR
If EXPR evaluates to a reference the type of the variable referenced
is returned. Otherwise C<undef> is returned.
+=item tainted EXPR
+
+Return true if the result of EXPR is tainted
+
=item weaken REF
REF will be turned into a weak reference. This means that it will not