@@ -1,5 +1,10 @@
Revision history for Tie::Util
+0.04 1 February, 2015
+ Tests: Suppress precedence warning in tests in perl 5.20.
+ Thanks to Reini Urban for the patch [rt.cpan.org #87230].
+ Bug fix: Fixed to work with perl 5.21.6.
+
0.03 15 August, 2010
Bug fix: Suppress ‘Ambiguous use’ warnings introduced in
perl 5.13.3.
@@ -1,17 +1,28 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Tie-Util
-version: 0.03
-version_from: lib/Tie/Util.pm
-installdirs: site
+--- #YAML:1.0
+name: Tie-Util
+version: 0.04
+abstract: Utility functions for fiddling with tied variables
+author:
+ - Father Chrysostomos <sprout & cpan . org>
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- B: 0
- constant: 0
- Exporter: 5.57
- overload: 0
- Scalar::Util: 1.09
- Symbol: 0
- warnings: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ B: 0
+ constant: 0
+ Exporter: 5.57
+ overload: 0
+ Scalar::Util: 1.09
+ Symbol: 0
+ warnings: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
@@ -1,4 +1,4 @@
-Tie::Util, version 0.03 (beta)
+Tie::Util, version 0.04 (beta)
This module provides a few subroutines for examining and modifying
tied variables, including those that hold weak references to the
@@ -8,6 +8,10 @@ opposed to objects.
RECENT CHANGES
+0.04
+----
+Bug fix: Fixed to work with perl 5.21.6.
+
0.03
----
Bug fix: Suppress ‘Ambiguous use’ warnings introduced in perl 5.13.3.
@@ -67,7 +71,7 @@ Or try using man (it's faster, in my experience):
COPYRIGHT AND LICENCE
-Copyright (C) 2007-10 Father Chrysostomos
+Copyright (C) 2007-15 Father Chrysostomos
This program is free software; you may redistribute it and/or modify
it under the same terms as perl.
@@ -2,7 +2,7 @@ package Tie::Util;
use 5.008;
-$VERSION = '0.03';
+$VERSION = '0.04';
# B doesn't export this. I *hope* it doesn't change!
use constant SVprv_WEAKREF => 0x80000000; # from sv.h
@@ -136,7 +136,7 @@ sub is_tied (\[%$@*]) {
#()= @$var # same here
()= $#$var;
} else {
- ()= $$var
+ my $dummy = $$var
}
};
_restore;
@@ -233,10 +233,7 @@ Tie::Util - Utility functions for fiddling with tied variables
=head1 VERSION
-Version 0.03
-
-This is a beta version. If you could please test it and report any bugs
-(via e-mail), I would be grateful.
+Version 0.04 (beta)
=head1 SYNOPSIS
@@ -315,9 +312,9 @@ call this with the C<Tie::Util::> prefix or use the C<&tie(...)> notation.
This is just like the built-in function except that, when called with
'to' as the package, it allows you to tie the variable to I<anything>
(well,
-any scalar at least). This is
+any scalar at least). This is
probably only useful for tying a variable to a package, as opposed to an
-object. (Believe it or not, it's just pure Perl; no XS trickery.)
+object. (Believe it or not, it's just pure Perl; no XS trickery.)
Otherwise the behaviour is identical to the core function.
@@ -325,7 +322,7 @@ Otherwise the behaviour is identical to the core function.
Like perl's L<tie|perlfunc/tie> function, this calls C<$package>'s tie
constructor, passing
-it the C<@args>, and ties the variable to the returned object. But the tie
+it the C<@args>, and ties the variable to the returned object. But the tie
that it creates is a weak one, i.e., the tied variable does not hold a
reference count on the object.
@@ -339,9 +336,9 @@ This turns an existing tie into a weak one.
=item is_weak_tie [*%@$]var
Returns a defined true or false, indicating whether a tied variable is
-weakly tied. Returns C<undef> if the variable is not tied.
+weakly tied. Returns C<undef> if the variable is not tied.
-NOTE: This used to return true for a variable tied to C<undef>. Now (as of
+NOTE: This used to return true for a variable tied to C<undef>. Now (as of
version 0.02) it returns false, because the tie does not actually hold a
weak reference; it holds no reference at all.
@@ -369,7 +366,7 @@ calling C<FETCH> and using its return value.
If you assign a reference to a tied variable, or a value that I<might> be a
reference to a variable that I<might> be tied, then you can 'fix' the tie
-afterwards by called C<fix_tie> on it. C<fix_tie> is an lvalue function
+afterwards by called C<fix_tie> on it. C<fix_tie> is an lvalue function
that returns its first argument after fixing it, so you can replace code
like
@@ -404,17 +401,18 @@ Scalar::Util 1.09 or later
This module does not provide a single function to access the information
obscured by
-a tie. For
+a tie. For
that, you can simply untie a variable, access its contents, and re-tie it
(which is fairly trivial with the functions this module already provides).
=back
-To report bugs, please e-mail the author.
+Please report bugs at L<http://rt.cpan.org/> or send email to
+<bug-Tie-Util@rt.cpan.org>.
=head1 AUTHOR & COPYRIGHT
-Copyright (C) 2007-10 Father Chrysostomos <sprout [at] cpan
+Copyright (C) 2007-14 Father Chrysostomos <sprout [at] cpan
[dot] org>
This program is free software; you may redistribute it and/or modify
@@ -856,7 +856,7 @@ sub _is_dualvar {
no warnings 'numeric';
my $numval = $val + 0;
- return $numval != 0 and $numval ne $val ? 1 : 0;
+ return ($numval != 0 and $numval ne $val ? 1 : 0);
}
=item B<is_eq>