From: Jarkko Hietaniemi Date: Thu, 26 Apr 2001 21:35:12 +0000 (+0000) Subject: Further cuts and more docs from Graham Barr. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee4ffb48aa883ad8331ae2352cd93252057df95d;p=p5sagit%2Fp5-mst-13.2.git Further cuts and more docs from Graham Barr. p4raw-id: //depot/perl@9868 --- diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm index 641ca97..f40ba98 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 2b81d8e..78324d0 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 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