Cheat-Meta
view release on metacpan or search on metacpan
lib/Cheat/Sheet/Util.agi view on Meta::CPAN
--Sparky Anderson
#-#========================================================================#-#
#-#=====# # UTILITY MODULES
#-# # [<-44 cols to end 78 cols ->]
#-# # #2345678901234567890123456789012345678901234
#-#
#=head2 Scalar::Util
use Scalar::Util; # General-utility scalar subroutines
use Scalar::Util qw(
weaken isweak reftype refaddr blessed isvstring readonly tainted
dualvar looks_like_number openhandle set_prototype
);
weaken $ref; # $ref will not keep @$ref, %$ref, etc. from GC
# note: copies of weak refs are not weak
$bool = isweak $ref; # true if $ref is a weak reference
$type = reftype $ref; # 'SCALAR', 'ARRAY', 'HASH', or undef
$addr = refaddr $ref; # machine address of $ref or undef
$got = blessed $ref; # class of blessed ref or undef
$bool = isvstring $s; # true if $s is a v-string
$bool = readonly $s; # true if $s is a readonly scalar
$bool = tainted $s; # true if $s is tainted
$got = dualvar $num, $string; # $got is $num or $string in context
$bool = looks_like_number $n; # true if $n can be a number
lib/Cheat/Sheet/Util.perl view on Meta::CPAN
# = Copyright 2011 Xiong Changnian <xiong@cpan.org> =
# = Free Software = Artistic License 2.0 = NO WARRANTY =
# v0.0.5
# I only had a high school education and believe me,
# I had to cheat to get that.
# --Sparky Anderson
#----------------------------------------------------------------------------#
use Scalar::Util; # General-utility scalar subroutines
use Scalar::Util qw(
weaken isweak reftype refaddr blessed isvstring readonly tainted
dualvar looks_like_number openhandle set_prototype
);
weaken $ref; # $ref will not keep @$ref, %$ref, etc. from GC
# note: copies of weak refs are not weak
$bool = isweak $ref; # true if $ref is a weak reference
$type = reftype $ref; # 'SCALAR', 'ARRAY', 'HASH', or undef
$addr = refaddr $ref; # machine address of $ref or undef
$got = blessed $ref; # class of blessed ref or undef
$bool = isvstring $s; # true if $s is a v-string
$bool = readonly $s; # true if $s is a readonly scalar
$bool = tainted $s; # true if $s is tainted
$got = dualvar $num, $string; # $got is $num or $string in context
$bool = looks_like_number $n; # true if $n can be a number
lib/Cheat/Sheet/Util.pod view on Meta::CPAN
=item * L</ List::Compare>
=item * L</ Hash::Util>
=back
=head2 Scalar::Util
use Scalar::Util; # General-utility scalar subroutines
use Scalar::Util qw(
weaken isweak reftype refaddr blessed isvstring readonly tainted
dualvar looks_like_number openhandle set_prototype
);
weaken $ref; # $ref will not keep @$ref, %$ref, etc. from GC
# note: copies of weak refs are not weak
$bool = isweak $ref; # true if $ref is a weak reference
$type = reftype $ref; # 'SCALAR', 'ARRAY', 'HASH', or undef
$addr = refaddr $ref; # machine address of $ref or undef
$got = blessed $ref; # class of blessed ref or undef
$bool = isvstring $s; # true if $s is a v-string
$bool = readonly $s; # true if $s is a readonly scalar
$bool = tainted $s; # true if $s is tainted
$got = dualvar $num, $string; # $got is $num or $string in context
$bool = looks_like_number $n; # true if $n can be a number
( run in 0.553 second using v1.01-cache-2.11-cpan-65fba6d93b7 )