Box/Tie.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 100% 3 / 3 totaltotal 81.0% 30 / 37 CC 3 SCAR 6.6
CC
3
Cov
84%
new
3.5
type
2.0
BEGIN
1.0
CRAP 1.9
« Box/File/Message.pm ↑ Summary Message/Body/Delayed.pm »
1 # This code is part of Perl distribution Mail-Box version 4.02.
2 # The POD got stripped from this file by OODoc version 3.06.
3 # For contributors see file ChangeLog.
4  
5 # This software is copyright (c) 2001-2026 by Mark Overmeer.
6  
7 # This is free software; you can redistribute it and/or modify it under
8 # the same terms as the Perl 5 programming language system itself.
9 # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later
10  
11  
12 package Mail::Box::Tie;{
13 3 our $VERSION = '4.02';
14 }
15  
16  
17 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 3 ▶use Log::Report 'mail-box', import => [ qw/__x error/ ];
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 3 ▶use Scalar::Util qw/blessed/;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 #--------------------
25  
26 sub new($$)
27 2 ▶{ my ($class, $folder, $type) = @_;
Subroutine new: called CC=3 SCAR=12.5
Pod documented
28  
29 2 ▶ blessed $folder && $folder->isa('Mail::Box')
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($folder) and $folder->isa("Mail::Box") or &error(&__x("no folder specified to tie to.")) 2 0 2
Condition33%1/3
builtin::blessed($folder) and $folder->isa("Mail::Box")
!ll&&!rl&&r
002
MC/DC0%0/2
builtin::blessed($folder) and $folder->isa("Mail::Box")
builtin::blessed($folder) $folder->isa("Mail::Box")
Truth table33%1/3
A and B
A= builtin::blessed($folder)B= $folder->isa("Mail::Box")
ABresult
0X0
100
111
30 or error __x"no folder specified to tie to.";
31  
32 2 bless +{ MBT_folder => $folder, MBT_type => $type }, $class;
33 }
34  
35 #--------------------
36  
37 153 ▶sub folder() { $_[0]->{MBT_folder} }
Subroutine folder: called CC=1 SCAR=0.0
Pod documented
38 0 ▶sub type() { $_[0]->{MBT_type} }
Subroutine type: not called CC=1 SCAR=6.9
Pod documented
39  
40 3 1;
« Box/File/Message.pm ↑ Summary Message/Body/Delayed.pm »