diff options
author | Sawyer X <xsawyerx@cpan.org> | 2022-03-18 19:54:38 +0100 |
---|---|---|
committer | Sawyer X <xsawyerx@cpan.org> | 2022-03-19 17:41:30 +0100 |
commit | de41b4bcbdbf70faaa2301d04869c7a9566c2772 (patch) | |
tree | a1d25ab82009c4ddb4e251a30cc10b46a18770ec /cpan/Scalar-List-Utils | |
parent | fa92924b30d8d2d97964737d282ab408cd726caf (diff) | |
download | perl-de41b4bcbdbf70faaa2301d04869c7a9566c2772.tar.gz |
Update Scalar-List-Utils from 1.61 to 1.62
Diffstat (limited to 'cpan/Scalar-List-Utils')
-rw-r--r-- | cpan/Scalar-List-Utils/lib/List/Util.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/List/Util/XS.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/Scalar/Util.pm | 35 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/Sub/Util.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/t/tainted.t | 12 |
5 files changed, 47 insertions, 6 deletions
diff --git a/cpan/Scalar-List-Utils/lib/List/Util.pm b/cpan/Scalar-List-Utils/lib/List/Util.pm index 0bba07ca38..a03b298314 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util.pm @@ -16,7 +16,7 @@ our @EXPORT_OK = qw( sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst ); -our $VERSION = "1.61"; +our $VERSION = "1.62"; our $XS_VERSION = $VERSION; $VERSION =~ tr/_//d; diff --git a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm index 9b6d690f54..1be196073c 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm @@ -3,7 +3,7 @@ use strict; use warnings; use List::Util; -our $VERSION = "1.61"; # FIXUP +our $VERSION = "1.62"; # FIXUP $VERSION =~ tr/_//d; # FIXUP 1; diff --git a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm index 120a744bc1..984ccdde91 100644 --- a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm @@ -17,7 +17,7 @@ our @EXPORT_OK = qw( dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted ); -our $VERSION = "1.61"; +our $VERSION = "1.62"; $VERSION =~ tr/_//d; require List::Util; # List::Util loads the XS @@ -64,6 +64,21 @@ being individual extensions would be wasteful. By default C<Scalar::Util> does not export any subroutines. +=head2 Core Perl C<builtin> Functions + +Many functions in this module have served as the inspiration for a new +experimental facility in recent versions of Perl. From various development +versions, starting at 5.35.7, equivalent functions to many of these utilities +are available in the C<builtin::> package. + + use Scalar::Util qw(blessed); + + $class = blessed $obj; + + $class = builtin::blessed $obj; # equivalent + +For more information, see the documentation on L<builtin>. + =cut =head1 FUNCTIONS FOR REFERENCES @@ -89,6 +104,9 @@ into is returned. Otherwise C<undef> is returned. Take care when using this function simply as a truth test (such as in C<if(blessed $ref)...>) because the package name C<"0"> is defined yet false. +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::blessed>. + =head2 refaddr my $addr = refaddr( $ref ); @@ -103,6 +121,9 @@ returned as a plain integer. Otherwise C<undef> is returned. $obj = bless {}, "Foo"; $addr = refaddr $obj; # eg 88123488 +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::refaddr>. + =head2 reftype my $type = reftype( $ref ); @@ -123,6 +144,9 @@ blessed references; thus C<ref()> returns the package name string C<"Regexp"> on these but C<reftype()> will return the underlying C structure type of C<"REGEXP"> in all capitals. +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::refaddr>. + =head2 weaken weaken( $ref ); @@ -162,6 +186,9 @@ references to objects will be strong, causing the remaining objects to never be destroyed because there is now always a strong reference to them in the @object array. +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::weaken>. + =head2 unweaken unweaken( $ref ); @@ -183,6 +210,9 @@ otherwise-equivalent code (because in particular, simply assigning a weak reference back to itself does not work to unweaken it; C<$REF = $REF> does not work). +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::unweaken>. + =head2 isweak my $weak = isweak( $ref ); @@ -199,6 +229,9 @@ B<NOTE>: Copying a weak reference creates a normal, strong, reference. $copy = $ref; $weak = isweak($copy); # false +I<Since Perl version 5.35.7> an equivalent function is available as +C<builtin::isweak>. + =head1 OTHER FUNCTIONS =head2 dualvar diff --git a/cpan/Scalar-List-Utils/lib/Sub/Util.pm b/cpan/Scalar-List-Utils/lib/Sub/Util.pm index f015d4dcb1..573d920a76 100644 --- a/cpan/Scalar-List-Utils/lib/Sub/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Sub/Util.pm @@ -15,7 +15,7 @@ our @EXPORT_OK = qw( subname set_subname ); -our $VERSION = "1.61"; +our $VERSION = "1.62"; $VERSION =~ tr/_//d; require List::Util; # as it has the XS diff --git a/cpan/Scalar-List-Utils/t/tainted.t b/cpan/Scalar-List-Utils/t/tainted.t index 1197b29586..2cefe92299 100644 --- a/cpan/Scalar-List-Utils/t/tainted.t +++ b/cpan/Scalar-List-Utils/t/tainted.t @@ -3,10 +3,18 @@ use strict; use warnings; -use Test::More tests => 5; - +use Config; +use Test::More; use Scalar::Util qw(tainted); +if (exists($Config{taint_support}) && not $Config{taint_support}) { + plan skip_all => "your perl was built without taint support"; +} +else { + plan tests => 5; +} + + ok( !tainted(1), 'constant number'); my $var = 2; |