diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-26 21:35:12 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-26 21:35:12 +0000 |
commit | ee4ffb48aa883ad8331ae2352cd93252057df95d (patch) | |
tree | 427a20a470317da6da3f434f514a0bd3f7c7e79d /ext/List | |
parent | c5da4faf1737eafa76e9fab4a61fa8d82518a600 (diff) | |
download | perl-ee4ffb48aa883ad8331ae2352cd93252057df95d.tar.gz |
Further cuts and more docs from Graham Barr.
p4raw-id: //depot/perl@9868
Diffstat (limited to 'ext/List')
-rw-r--r-- | ext/List/Util/lib/List/Util.pm | 14 | ||||
-rw-r--r-- | ext/List/Util/lib/Scalar/Util.pm | 27 |
2 files changed, 16 insertions, 25 deletions
diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm index 641ca97a21..f40ba98f91 100644 --- a/ext/List/Util/lib/List/Util.pm +++ b/ext/List/Util/lib/List/Util.pm @@ -7,17 +7,13 @@ 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; diff --git a/ext/List/Util/lib/Scalar/Util.pm b/ext/List/Util/lib/Scalar/Util.pm index 2b81d8e903..78324d0e17 100644 --- a/ext/List/Util/lib/Scalar/Util.pm +++ b/ext/List/Util/lib/Scalar/Util.pm @@ -9,22 +9,9 @@ package Scalar::Util; 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; @@ -68,11 +55,19 @@ value STRING in a string context. 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 |