File Coverage

blib/lib/Scalar/Util.pm
Criterion Covered Total %
statement 0 9 0.0
branch 0 4 0.0
condition n/a
subroutine 0 1 0.0
pod 0 1 0.0
total 0 15 0.0


line stmt bran cond sub pod time code
1             # Copyright (c) 1997-2007 Graham Barr . All rights reserved.
2             # This program is free software; you can redistribute it and/or
3             # modify it under the same terms as Perl itself.
4             #
5             # Maintained since 2013 by Paul Evans
6              
7             package Scalar::Util;
8              
9             use strict;
10             use warnings;
11             require Exporter;
12              
13             our @ISA = qw(Exporter);
14             our @EXPORT_OK = qw(
15             blessed refaddr reftype weaken unweaken isweak
16              
17             dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
18             tainted
19             );
20             our $VERSION = "1.46_01";
21             our $XS_VERSION = $VERSION;
22             $VERSION = eval $VERSION;
23              
24             require XSLoader;
25             XSLoader::load(__PACKAGE__, $XS_VERSION);
26              
27             our @EXPORT_FAIL;
28              
29             unless (defined &weaken) {
30             push @EXPORT_FAIL, qw(weaken);
31             }
32             unless (defined &isweak) {
33             push @EXPORT_FAIL, qw(isweak);
34             }
35             unless (defined &isvstring) {
36             push @EXPORT_FAIL, qw(isvstring);
37             }
38              
39             sub export_fail {
40 0 0   0 0   if (grep { /^(?:weaken|isweak)$/ } @_ ) {
  0            
41 0           require Carp;
42 0           Carp::croak("Weak references are not implemented in the version of perl");
43             }
44              
45 0 0         if (grep { /^isvstring$/ } @_ ) {
  0            
46 0           require Carp;
47 0           Carp::croak("Vstrings are not implemented in the version of perl");
48             }
49              
50 0           @_;
51             }
52              
53             1;
54              
55             __END__