File Coverage

inc/Scalar/Util.pm
Criterion Covered Total %
statement 0 11 0.0
branch 0 4 0.0
condition n/a
subroutine 0 2 0.0
pod 1 2 50.0
total 1 19 5.2


line stmt bran cond sub pod time code
1             #line 1
2             # Copyright (c) 1997-2007 Graham Barr . All rights reserved.
3             # This program is free software; you can redistribute it and/or
4             # modify it under the same terms as Perl itself.
5             #
6             # Maintained since 2013 by Paul Evans
7              
8             package Scalar::Util;
9              
10             use strict;
11             use warnings;
12             require Exporter;
13              
14             our @ISA = qw(Exporter);
15             our @EXPORT_OK = qw(
16             blessed refaddr reftype weaken unweaken isweak
17              
18             dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
19             tainted
20             );
21             our $VERSION = "1.46_02";
22             $VERSION = eval $VERSION;
23              
24             require List::Util; # List::Util loads the XS
25             List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
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 isvstring);
34             }
35             unless (defined &isvstring) {
36             push @EXPORT_FAIL, qw(isvstring);
37             }
38              
39 0 0   0 0   sub export_fail {
  0            
40 0           if (grep { /^(?:weaken|isweak)$/ } @_ ) {
41 0           require Carp;
42             Carp::croak("Weak references are not implemented in the version of perl");
43             }
44 0 0          
  0            
45 0           if (grep { /^isvstring$/ } @_ ) {
46 0           require Carp;
47             Carp::croak("Vstrings are not implemented in the version of perl");
48             }
49 0            
50             @_;
51             }
52              
53             # set_prototype has been moved to Sub::Util with a different interface
54             sub set_prototype(&$)
55 0     0 1   {
56 0           my ( $code, $proto ) = @_;
57             return Sub::Util::set_prototype( $proto, $code );
58             }
59              
60             1;
61              
62             __END__