DRI.pm

filter: Statementstmt 79.2% 149 / 188 Branchbran 43.6% 41 / 94 Conditioncond 41.6% 10 / 24 MC/DCmcdc 12.5% 2 / 16 Subroutinesub 76.6% 23 / 30 Podpod 7.1% 1 / 14 totaltotal 61.7% 226 / 366 CC 58 SCAR 20.2
CC
58
Cov
65%
del_registry
30.0
add_registry
12.9
del_registry
12.0
CRAP 7.5
« DRI/Protocol/DAS/SIDN/Message.pm ↑ Summary DRI/Data/StatusList.pm »
1 ## Domain Registry Interface, Main entry point
2 ##
3 ## Copyright (c) 2005-2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
4 ##
5 ## This file is part of Net::DRI
6 ##
7 ## Net::DRI is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2 of the License, or
10 ## (at your option) any later version.
11 ##
12 ## See the LICENSE file that comes with this distribution for more details.
13 ####################################################################################################
14  
15 package Net::DRI;
16  
17 85 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 85 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 85 ▶use Net::DRI::Cache;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 85 ▶use Net::DRI::Registry;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 85 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 85 ▶use Net::DRI::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 85 ▶use base qw(Class::Accessor::Chained::Fast Net::DRI::BaseClass);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 85 __PACKAGE__->mk_ro_accessors(qw/trid_factory logging cache/);
27  
28 85 our $AUTOLOAD;
29 85 our $VERSION='0.96_12';
30  
31 =pod
32  
33 =head1 NAME
34  
35 Net::DRI - Interface to Domain Name Registries/Registrars/Resellers
36  
37 =head1 VERSION
38  
39 This documentation refers to Net::DRI version 0.96_12
40  
41 =head1 SYNOPSIS
42  
43 use Net::DRI;
44 my $dri=Net::DRI->new({ cache_ttl => 10, trid_factory => ..., logging => .... });
45  
46 ... various operations ...
47  
48 $dri->end();
49  
50 =head1 DESCRIPTION
51  
52 Net::DRI is a Perl library to access services offered by domain name
53 providers, such as registries or registrars. DRI stands for
54 Domain Registration Interface and it aims to be
55 for domain name registries/registrars/resellers what DBI is for databases:
56 an abstraction over multiple providers, with multiple policies, transports
57 and protocols all used through a uniform API.
58  
59 It is an object-oriented framework implementing RRP (RFC 2832/3632),
60 EPP (core EPP in RFC 5730/5731/5732/5733/5734 aka STD69, extensions in
61 RFC 3915/4114/4310/5076 and various extensions of ccTLDs/gTLDs
62 - currently more than 60 TLDs are directly supported with extensions),
63 RRI (.DE registration protocol), Whois, DAS (Domain Availability Service used by .BE, .EU, .AU, .NL),
64 IRIS (RFC3981) DCHK (RFC5144) over LWZ (RFC4993) for .DE currently and XCP (RFC4992),
65 .FR/.RE email and webservices interface, and resellers interface of some registrars
66 (Gandi, OpenSRS, etc.).
67 It has transports for connecting with UDP/TCP/TLS, HTTP/HTTPS,
68 Web Services (XML-RPC and SOAP with/without WSDL),
69 or SMTP-based registries/registrars.
70  
71 It is not limited to handling of domain names, it can be easily extended.
72 For example, it supports ENUM registrations and validations, or DNSSEC provisioning.
73  
74 A shell is included for easy prototyping and debugging, see L<Net::DRI::Shell>.
75 Caching and logging features are also included by default.
76  
77 Please see the included README file for full details.
78  
79 =head1 EXAMPLES
80  
81 Please see the C<eg/> subdirectory of the distribution, it contains various
82 examples. Please also see all unit tests under C<t/>, they show all parts of the API.
83  
84 =head1 SUBROUTINES/METHODS
85  
86 After having used Net::DRI (which is the only module you should need to C<use> from
87 this distribution), you create an object as instance of this class,
88 and every operation will be carried through it.
89  
90 =head2 trid_factory()
91  
92 This is an accessor to the trid factory (code reference) used to generate client
93 transaction identificators, that are useful for logging and asynchronous operations.
94  
95 During the C<new()> call, a C<trid_factory()> is initialized to a default safe value
96 (being Net::DRI::Util::create_trid_1).
97  
98 You need to call this method only if you wish to use another function to generate transaction identificators.
99  
100 All other objects (registry profiles and transports)
101 created after that will inherit this value. If you call again C<trid_factory()>
102 the change will only apply to new objects (registry profiles and transports) created after the change,
103 it will not apply to already existing objects (registry profiles and transports).
104  
105 =head2 logging()
106  
107 This is an accessor to the underlying Logging object. During the C<new()> call you can
108 provide the object, or just a string ("null", "stderr", "files" or "syslog" which are the
109 current logging modules available in Net::DRI), or a reference to an array
110 with the first parameter a string (same as previously) and the second parameter a reference to
111 an hash with data needed by the logging class used (see for example L<Net::DRI::Logging::Files>).
112  
113 If you want to log the application data (what is exchanged with remote server, such as EPP XML streams),
114 you need to use logging level of 'notice', or higher.
115  
116 =head2 cache()
117  
118 This is an accessor to the underlying Cache object. See L<Net::DRI::Cache>.
119 This object has a C<ttl()> method to access and change the current time to live
120 for cached data.
121  
122 =head1 SUPPORT
123  
124 For now, support questions should be sent to:
125  
126 E<lt>netdri@dotandco.comE<gt>
127  
128 Please also see the SUPPORT file in the distribution.
129  
130 =head1 SEE ALSO
131  
132 L<http://www.dotandco.com/services/software/Net-DRI/>
133  
134 =head1 AUTHOR
135  
136 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
137 and various contributors (see Changes file and web page above)
138  
139 =head1 COPYRIGHT
140  
141 Copyright (c) 2005-2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>.
142 All rights reserved.
143  
144 =head1 LICENSE
145  
146 This program is free software; you can redistribute it and/or modify
147 it under the terms of the GNU General Public License as published by
148 the Free Software Foundation; either version 2 of the License, or
149 (at your option) any later version.
150  
151 See the LICENSE file that comes with this distribution for more details.
152  
153 =cut
154  
155 ####################################################################################################
156  
157 sub new
158 {
159 78 ▶ my ($class,$rh)=@_;
Subroutine new: called CC=7 SCAR=19.7
Pod documented
160  
161 my $self={ cache => Net::DRI::Cache->new(Net::DRI::Util::has_key($rh,'cache_ttl') ? $rh->{cache_ttl} : 0),
162 current_registry => undef, ## registry name (key of following hash)
163 registries => {}, ## registry name => Net::DRI::Registry object
164 tlds => {}, ## tld => [ registries name ]
165 time_created => time(),
166 78 ▶ trid_factory => (Net::DRI::Util::has_key($rh,'trid_factory') && ref $rh->{trid_factory} eq 'CODE')? $rh->{trid_factory} : \&Net::DRI::Util::create_trid_1,
Branch: 2 branches
BranchTrueFalseTotal
Net::DRI::Util::has_key($rh, 'cache_ttl') ? : 77 1 78
Net::DRI::Util::has_key($rh, 'trid_factory') && ref $rh->{'trid_factory'} eq 'CODE' ? : 11 67 78
Condition66%2/3
Net::DRI::Util::has_key($rh, "trid_factory") and ref $rh->{"trid_factory"} eq "CODE"
!ll&&!rl&&r
67011
MC/DC50%1/2
Net::DRI::Util::has_key($rh, "trid_factory") and ref $rh->{"trid_factory"} eq "CODE"
Net::DRI::Util::has_key($rh, "trid_factory") ref $rh->{"trid_factory"} eq "CODE"
Truth table66%2/3
A and B
A= Net::DRI::Util::has_key($rh, "trid_factory")B= ref $rh->{"trid_factory"} eq "CODE"
ABresult
0X0
100
111
167 };
168  
169 78 my ($logname,@logdata);
170 78 ▶ if (Net::DRI::Util::has_key($rh,'logging'))
Branch: 1 branch
BranchTrueFalseTotal
if (Net::DRI::Util::has_key($rh, 'logging')) { } 5 73 78
171 {
172 5 ▶ ($logname,@logdata)=ref $rh->{logging} eq 'ARRAY' ? @{$rh->{logging}} : ($rh->{logging});
Branch: 1 branch
BranchTrueFalseTotal
ref $rh->{'logging'} eq 'ARRAY' ? : 0 5 5
173 } else
174 {
175 73 $logname='null';
176 }
177 78 ▶ if ($logname !~ s/^\+//) { $logname='Net::DRI::Logging::'.ucfirst($logname); }
Branch: 1 branch
BranchTrueFalseTotal
unless ($logname =~ s/^\+//) 78 0 78
178 78 Net::DRI::Util::load_module($logname,'DRI');
179 78 $self->{logging}=$logname->new(@logdata);
180  
181 78 bless($self,$class);
182 78 $self->logging()->setup_channel(__PACKAGE__,'core');
183 78 $self->log_output('notice','core','Successfully created Net::DRI object with logging='.$logname);
184 78 return $self;
185 }
186  
187 sub add_current_registry
188 {
189 44 ▶ my ($self,@p)=@_;
Subroutine add_current_registry: called CC=1 SCAR=0.0
Pod undocumented
190 44 $self->add_registry(@p);
191 44 $self->target($self->{last_registry});
192 44 return $self;
193 }
194  
195 sub add_registry
196 {
197 78 ▶ my ($self,$reg,@data)=@_;
Subroutine add_registry: called CC=11 SCAR=25.6
Pod undocumented
198 78 ▶ Net::DRI::Exception::usererr_insufficient_parameters('add_registry needs a registry name') unless Net::DRI::Util::all_valid($reg);
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::all_valid($reg) 0 78 78
199 78 ▶ $reg='Net::DRI::DRD::'.$reg unless $reg=~m/^\+/;
Branch: 1 branch
BranchTrueFalseTotal
unless $reg =~ /^\+/ 78 0 78
200 78 Net::DRI::Util::load_module($reg,'DRI');
201  
202 78 my $drd=$reg->new(@data);
203 78 ▶ Net::DRI::Exception->die(1,'DRI',9,'Failed to initialize registry '.$reg) unless ($drd && ref $drd);
Branch: 1 branch
BranchTrueFalseTotal
unless $drd and ref $drd 0 78 78
Condition33%1/3
$drd and ref $drd
!ll&&!rl&&r
0078
MC/DC0%0/2
$drd and ref $drd
$drd ref $drd
Truth table33%1/3
A and B
A= $drdB= ref $drd
ABresult
0X0
100
111
204  
205 78 ▶ Net::DRI::Exception::method_not_implemented('name',$reg) unless $drd->can('name');
Branch: 1 branch
BranchTrueFalseTotal
unless $drd->can("name") 0 78 78
206 78 my $regname=$drd->name();
207 78 ▶ Net::DRI::Exception->die(1,'DRI',10,'No dot allowed in registry name: '.$regname) unless index($regname,'.') == -1;
Branch: 1 branch
BranchTrueFalseTotal
unless index($regname, ".") == -1 0 78 78
208 78 ▶ Net::DRI::Exception->die(1,'DRI',11,'New registry name already in use') if exists $self->{registries}->{$regname};
Branch: 1 branch
BranchTrueFalseTotal
if exists $self->{"registries"}{$regname} 0 78 78
209  
210 78 my $ndr=Net::DRI::Registry->new($regname,$drd,$self->{cache},$self->{trid_factory},$self->{logging});
211 78 ▶ Net::DRI::Exception::method_not_implemented('tlds',$reg) unless $drd->can('tlds');
Branch: 1 branch
BranchTrueFalseTotal
unless $drd->can("tlds") 0 78 78
212 78 foreach my $tld ($drd->tlds())
213 {
214 480 $tld=lc($tld);
215 480 ▶ $self->{tlds}->{$tld}=[] unless exists $self->{tlds}->{$tld};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"tlds"}{$tld} 480 0 480
216 480 push @{$self->{tlds}->{$tld}},$regname;
217 }
218  
219 78 $self->log_output('notice','core','Successfully added registry "'.$regname.'"');
220 78 $self->{registries}->{$regname}=$ndr;
221 78 $self->{last_registry}=$regname;
222 78 return $self;
223 }
224  
225 sub del_registry
226 {
227 0 ▶ my ($self,$name)=@_;
Subroutine del_registry: not called CC=5 SCAR=34.0
Pod undocumented
228 0 ▶ if (defined $name)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $name) { } 0 0 0
229 {
230 0 ▶ err_registry_name_does_not_exist($name) unless exists $self->{registries}->{$name};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"registries"}{$name} 0 0 0
231 } else
232 {
233 0 ▶ err_no_current_registry() unless defined $self->{current_registry};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"current_registry"} 0 0 0
234 0 $name=$self->{current_registry};
235 }
236 0 $self->{registries}->{$name}->end();
237 0 delete($self->{registries}->{$name});
238 0 ▶ $self->{current_registry}=undef if $self->{current_registry} eq $name;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"current_registry"} eq $name 0 0 0
239 0 $self->log_output('notice','core','Successfully deleted registry "'.$name.'"');
240 0 return $self;
241 }
242  
243 ####################################################################################################
244  
245 0 ▶sub err_no_current_registry { Net::DRI::Exception->die(0,'DRI',1,'No current registry available'); } ## no critic (Subroutines::RequireArgUnpacking Subroutines::RequireFinalReturn)
Subroutine err_no_current_registry: not called CC=1 SCAR=6.9
Pod undocumented
246 0 ▶sub err_registry_name_does_not_exist { Net::DRI::Exception->die(0,'DRI',2,'Registry name '.$_[0].' does not exist'); } ## no critic (Subroutines::RequireArgUnpacking Subroutines::RequireFinalReturn)
Subroutine err_registry_name_does_not_exist: not called CC=1 SCAR=6.9
Pod undocumented
247  
248 ####################################################################################################
249 ## Accessor functions
250  
251 0 ▶sub available_registries { my ($self)=@_; my @r=sort { $a cmp $b } keys %{$self->{registries}}; return @r; }
Subroutine available_registries: not called CC=1 SCAR=6.9
Pod undocumented
252 sub available_registries_profiles
253 {
254 0 ▶ my ($self,$full)=@_;
Subroutine available_registries_profiles: not called CC=2 SCAR=17.9
Pod undocumented
255 0 my %r;
256 0 foreach my $reg (keys(%{$self->{registries}}))
257 {
258 0 $r{$reg}=[ $self->{registries}->{$reg}->available_profiles($full) ];
259 }
260 0 return \%r;
261 }
262 82 ▶sub registry_name { return shift->{current_registry}; }
Subroutine registry_name: called CC=1 SCAR=0.0
Pod undocumented
263  
264 sub registry
265 {
266 82 ▶ my ($self)=@_;
Subroutine registry: called CC=5 SCAR=17.8
Pod undocumented
267 82 my $regname=$self->registry_name();
268 82 ▶ err_no_current_registry() unless (defined($regname) && $regname);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $regname and $regname 0 82 82
Condition33%1/3
defined $regname and $regname
!ll&&!rl&&r
0082
MC/DC0%0/2
defined $regname and $regname
defined $regname $regname
Truth table33%1/3
A and B
A= defined $regnameB= $regname
ABresult
0X0
100
111
269 82 ▶ err_registry_name_does_not_exist($regname) unless (exists($self->{registries}->{$regname}));
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"registries"}{$regname} 0 82 82
270 82 my $ndr=$self->{registries}->{$regname};
271 82 ▶ return wantarray? ($regname,$ndr) : $ndr;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 82 0 82
272 }
273  
274 sub tld2reg
275 {
276 2 ▶ my ($self,$tld)=@_;
Subroutine tld2reg: called CC=5 SCAR=17.3
Pod undocumented
277 2 ▶ return unless defined($tld) && $tld;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $tld and $tld 0 2 2
Condition33%1/3
defined $tld and $tld
!ll&&!rl&&r
002
MC/DC0%0/2
defined $tld and $tld
defined $tld $tld
Truth table33%1/3
A and B
A= defined $tldB= $tld
ABresult
0X0
100
111
278 2 $tld=lc($tld);
279 2 ▶ $tld=$1 if ($tld=~m/\.([a-z0-9]+)$/);
Branch: 1 branch
BranchTrueFalseTotal
if $tld =~ /\.([a-z0-9]+)$/ 0 2 2
280 2 ▶ return unless exists($self->{tlds}->{$tld});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"tlds"}{$tld} 0 2 2
281 2 my @t=@{$self->{tlds}->{$tld}};
282 2 return @t;
283 }
284  
285 sub installed_registries
286 {
287 0 ▶ return qw/AdamsNames Afilias AFNIC ARNES auDA BelizeNIC BookMyName CentralNic CGIBR CIRA CoCCA CZNIC Datacom DENIC DNSBelgium DNSPT doMEn Domicilium DotAsia DotCooperation dotMOBI EURid Gandi GDI ICMRegistry IENUMAT IRegistry ISPAPI IIS IITCNR IUSN NASK Neustar::BIZ Neustar::US NicAT NicLC Nominet NORID OpenSRS OVH PANDI PIR puntCAT RDS RegistryPro RESTENA SaintVincentGrenadines SIDN SITA SONIC SWITCH TCI TELEGreenland Telnic TRA Tralliance UHSA UPU VCS VeriSign::COM_NET VeriSign::NAME VeriSign::NameStore ZACR/;
Subroutine installed_registries: not called CC=1 SCAR=6.9
Pod undocumented
288 }
289  
290 ####################################################################################################
291  
292 sub target
293 {
294 78 ▶ my ($self,$driver,$profile)=@_;
Subroutine target: called CC=8 SCAR=22.7
Pod undocumented
295  
296 ## Try to convert if given a domain name or a tld instead of a driver's name
297 78 ▶ if (defined $driver && ! exists $self->{registries}->{$driver})
Branch: 1 branch
BranchTrueFalseTotal
if (defined $driver and not exists $self->{"registries"}{$driver}) 2 76 78
Condition66%2/3
defined $driver and not exists $self->{"registries"}{$driver}
!ll&&!rl&&r
0762
MC/DC50%1/2
defined $driver and not exists $self->{"registries"}{$driver}
defined $driver not exists $self->{"registries"}{$driver}
Truth table66%2/3
A and not(B)
A= defined $driverB= not exists $self->{"registries"}{$driver}
ABresult
0X0
100
111
298 {
299 2 my @t=$self->tld2reg($driver);
300 2 ▶ Net::DRI::Exception->die(0,'DRI',7,'Registry not found for domain name/TLD '.$driver) unless (@t==1);
Branch: 1 branch
BranchTrueFalseTotal
unless @t == 1 0 2 2
301 2 $driver=$t[0];
302 }
303  
304 78 ▶ $driver=$self->registry_name() unless defined $driver;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $driver 0 78 78
305 78 ▶ err_registry_name_does_not_exist($driver) unless defined $driver && $driver;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $driver and $driver 0 78 78
Condition33%1/3
defined $driver and $driver
!ll&&!rl&&r
0078
MC/DC0%0/2
defined $driver and $driver
defined $driver $driver
Truth table33%1/3
A and B
A= defined $driverB= $driver
ABresult
0X0
100
111
306  
307 78 ▶ if (defined $profile)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $profile) 0 78 78
308 {
309 0 $self->{registries}->{$driver}->target($profile);
310 }
311  
312 78 $self->{current_registry}=$driver;
313 78 return $self;
314 }
315  
316 ####################################################################################################
317 ## The meat of everything
318 ## See Cookbook, page 468
319 sub AUTOLOAD
320 {
321 82 ▶ my ($self,@args)=@_;
Subroutine AUTOLOAD: called CC=4 SCAR=14.6
322 82 my $attr=$AUTOLOAD;
323 82 $attr=~s/.*:://;
324 82 ▶ return unless $attr=~m/[^A-Z]/; ## skip DESTROY and all-cap methods
Branch: 1 branch
BranchTrueFalseTotal
unless $attr =~ /[^A-Z]/ 0 82 82
325  
326 82 my ($name,$ndr)=$self->registry();
327 82 ▶ Net::DRI::Exception::method_not_implemented($attr,$ndr) unless ref $ndr && $ndr->can($attr);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $ndr and $ndr->can($attr) 0 82 82
Condition33%1/3
ref $ndr and $ndr->can($attr)
!ll&&!rl&&r
0082
MC/DC0%0/2
ref $ndr and $ndr->can($attr)
ref $ndr $ndr->can($attr)
Truth table33%1/3
A and B
A= ref $ndrB= $ndr->can($attr)
ABresult
0X0
100
111
328 82 $self->log_output('debug','core','Calling '.$attr.' from Net::DRI');
329 82 return $ndr->$attr(@args); ## is goto beter here ?
330 }
331  
332 sub end
333 {
334 78 ▶ my $self=shift;
Subroutine end: called CC=5 SCAR=16.4
Pod undocumented
335 78 ▶ while(my ($name,$v)=each(%{$self->{registries}}))
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$$self{"registries"};}) 78 78 156
336 {
337 78 ▶ $v->end() if (ref($v) && $v->can('end'));
Branch: 1 branch
BranchTrueFalseTotal
if ref $v and $v->can("end") 78 0 78
Condition33%1/3
ref $v and $v->can("end")
!ll&&!rl&&r
0078
MC/DC0%0/2
ref $v and $v->can("end")
ref $v $v->can("end")
Truth table33%1/3
A and B
A= ref $vB= $v->can("end")
ABresult
0X0
100
111
338 78 $self->log_output('notice','core','Successfully ended registry "'.$name.'"');
339 78 $v={};
340 }
341 78 $self->{tlds}={};
342 78 $self->{registries}={};
343 78 $self->{current_registry}=undef;
344 78 ▶ if (defined $self->{logging})
Branch: 1 branch
BranchTrueFalseTotal
if (defined $self->{"logging"}) 78 0 78
345 {
346 78 $self->log_output('notice','core','Successfully ended Net::DRI object');
347 78 $self->{logging}=undef;
348 }
349  
350 78 return 1; ## this makes it easy to test if everything before was ok or not, if we are inside an eval {} and $dri->end() is the last operation inside the eval block
351 }
352  
353 78 ▶sub DESTROY { my $self=shift; return $self->end(); }
Subroutine DESTROY: called CC=1 SCAR=0.0
354  
355 ####################################################################################################
356  
357 package Net::DRI::TrapExceptions; ## no critic (Modules::ProhibitMultiplePackages)
358  
359 85 ▶use base qw/Net::DRI/;
Subroutine BEGIN: called CC=1 SCAR=0.0
360  
361 85 our $AUTOLOAD;
362  
363 ## Some methods may die in Net::DRI, we specifically trap them
364 68 ▶sub add_registry { my ($self,@p)=@_; my $r; my $ok=eval { $r=$self->SUPER::add_registry(@p); 1; }; return $r if $ok; die(ref $@ ? $@->as_string() : $@); }
Subroutine add_registry: called CC=3 SCAR=12.3
Branch: 2 branches
BranchTrueFalseTotal
if $ok 68 0 68
ref $@ ? : 0 0 0
365 0 ▶sub del_registry { my ($self,@p)=@_; my $r; my $ok=eval { $r=$self->SUPER::del_registry(@p); 1; }; return $r if $ok; die(ref $@ ? $@->as_string() : $@); }
Subroutine del_registry: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
if $ok 0 0 0
ref $@ ? : 0 0 0
366 68 ▶sub registry { my ($self,@p)=@_; my @r; my $ok=eval { @r=$self->SUPER::registry(@p); 1; }; if ($ok) { return wantarray ? @r : $r[0]; } die(ref $@ ? $@->as_string() : $@); }
Subroutine registry: called CC=4 SCAR=15.5
Branch: 3 branches
BranchTrueFalseTotal
if ($ok) 68 0 68
wantarray ? : 68 0 68
ref $@ ? : 0 0 0
367 68 ▶sub target { my ($self,@p)=@_; my $r; my $ok=eval { $r=$self->SUPER::target(@p); 1; }; return $r if $ok; die(ref $@ ? $@->as_string() : $@); }
Subroutine target: called CC=3 SCAR=12.3
Branch: 2 branches
BranchTrueFalseTotal
if $ok 68 0 68
ref $@ ? : 0 0 0
368 68 ▶sub end { my ($self,@p)=@_; my $r; my $ok=eval { $r=$self->SUPER::end(@p); 1; }; return $r if $ok; die(ref $@ ? $@->as_string() : $@); }
Subroutine end: called CC=3 SCAR=12.3
Branch: 2 branches
BranchTrueFalseTotal
if $ok 68 0 68
ref $@ ? : 0 0 0
369  
370 sub AUTOLOAD
371 {
372 68 ▶ my $self=shift;
Subroutine AUTOLOAD: called CC=4 SCAR=15.8
373 68 my @r;
374 68 $Net::DRI::AUTOLOAD=$AUTOLOAD;
375 68 my $ok=eval { @r=$self->SUPER::AUTOLOAD(@_); 1; };
376 68 ▶ if (! $ok)
Branch: 1 branch
BranchTrueFalseTotal
unless ($ok) 68 0 68
377 {
378 68 my $err=$@;
379 68 ▶ die(ref $err ? $err->as_string() : $err);
Branch: 1 branch
BranchTrueFalseTotal
ref $err ? : 68 0 68
380 }
381 0 ▶ return wantarray ? @r : $r[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
382 }
383  
384 ####################################################################################################
385 85 1;
« DRI/Protocol/DAS/SIDN/Message.pm ↑ Summary DRI/Data/StatusList.pm »