KDBX/Tie/Entry.pm

filter: Statementstmt 72.2% 52 / 72 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.6% 34 / 59 Podpod 0.0% 0 / 2 totaltotal 64.0% 89 / 139 SCAR 14.8
CC
4
Cov
71%
__ANON__
2.1
__ANON__
2.1
__ANON__
2.1
CRAP 4.4
« KDBX/Tie/GroupList.pm ↑ Summary KDBX/Tie/Group.pm »
1 package File::KeePass::KDBX::Tie::Entry;
2 # ABSTRACT: Database entry
3  
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use Crypt::Digest;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use Time::Piece;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use boolean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 ▶use parent 'File::KeePass::KDBX::Tie::Hash';
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 our $VERSION = '0.901'; # VERSION
15  
16 my %GET = (
17 4 ▶ accessed => sub { File::KeePass::KDBX::_decode_datetime($_[0]->last_access_time) },
Subroutine __ANON__: called CC=1 SCAR=0.0
18 2 ▶ usage_count => sub { $_[0]->usage_count },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 2 ▶ expires_enabled => sub { $_[0]->expires ? 1 : 0 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_[0]->expires ? : 2 0 2
20 10 ▶ created => sub { File::KeePass::KDBX::_decode_datetime($_[0]->creation_time) },
Subroutine __ANON__: called CC=1 SCAR=0.0
21 12 ▶ expires => sub { File::KeePass::KDBX::_decode_datetime($_[0]->expiry_time) },
Subroutine __ANON__: called CC=1 SCAR=0.0
22 4 ▶ modified => sub { File::KeePass::KDBX::_decode_datetime($_[0]->last_modification_time) },
Subroutine __ANON__: called CC=1 SCAR=0.0
23 2 ▶ location_changed => sub { File::KeePass::KDBX::_decode_datetime($_[0]->location_changed) },
Subroutine __ANON__: called CC=1 SCAR=0.0
24 4 ▶ auto_type_munge => sub { $_[0]->auto_type->{data_transfer_obfuscation} ? 1 : 0 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_[0]->auto_type->{'data_transfer_obfuscation'} ? : 4 0 4
25 2 ▶ auto_type_enabled => sub { $_[0]->auto_type->{enabled} ? 1 : 0 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_[0]->auto_type->{'enabled'} ? : 2 0 2
26 7 ▶ auto_type => sub { $_[-1]->_tie([], 'AssociationList', $_[0]) },
Subroutine __ANON__: called CC=1 SCAR=0.0
27 4 ▶ comment => sub { $_[0]->notes },
Subroutine __ANON__: called CC=1 SCAR=0.0
28 4 ▶ username => sub { $_[0]->username },
Subroutine __ANON__: called CC=1 SCAR=0.0
29 12 ▶ password => sub { $_[0]->password },
Subroutine __ANON__: called CC=1 SCAR=0.0
30 4 ▶ url => sub { $_[0]->url },
Subroutine __ANON__: called CC=1 SCAR=0.0
31 70 ▶ title => sub { $_[0]->title },
Subroutine __ANON__: called CC=1 SCAR=0.0
32 2 ▶ protected => sub { $_[-1]->_tie({}, 'Protected', $_[0]) },
Subroutine __ANON__: called CC=1 SCAR=0.0
33 2 ▶ override_url => sub { $_[0]->override_url },
Subroutine __ANON__: called CC=1 SCAR=0.0
34 2 ▶ tags => sub { $_[0]->tags },
Subroutine __ANON__: called CC=1 SCAR=0.0
35 4 ▶ icon => sub { $_[0]->icon_id + 0 },
Subroutine __ANON__: called CC=1 SCAR=0.0
36 26 ▶ id => sub { $_[0]->uuid },
Subroutine __ANON__: called CC=1 SCAR=0.0
37 2 ▶ foreground_color => sub { $_[0]->foreground_color },
Subroutine __ANON__: called CC=1 SCAR=0.0
38 4 ▶ background_color => sub { $_[0]->background_color },
Subroutine __ANON__: called CC=1 SCAR=0.0
39 2 ▶ history => sub { $_[-1]->_tie([], 'EntryList', $_[0], 'history') },
Subroutine __ANON__: called CC=1 SCAR=0.0
40 2 ▶ strings => sub { $_[-1]->_tie({}, 'Strings', $_[0]) },
Subroutine __ANON__: called CC=1 SCAR=0.0
41 5 ▶ binary => sub { $_[-1]->_tie({}, 'Binary', $_[0]) },
Subroutine __ANON__: called CC=1 SCAR=0.0
42 3 );
43 my %SET = (
44 0 ▶ accessed => sub { $_[0]->last_access_time(File::KeePass::KDBX::_encode_datetime($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
45 0 ▶ usage_count => sub { $_[0]->usage_count($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
46 0 ▶ expires_enabled => sub { $_[0]->expires($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
47 0 ▶ created => sub { $_[0]->creation_time(File::KeePass::KDBX::_encode_datetime($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
48 0 ▶ expires => sub { $_[0]->expiry_time(File::KeePass::KDBX::_encode_datetime($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 0 ▶ modified => sub { $_[0]->last_modification_time(File::KeePass::KDBX::_encode_datetime($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
50 0 ▶ location_changed => sub { $_[0]->location_changed(File::KeePass::KDBX::_encode_datetime($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
51 0 ▶ override_url => sub { $_[0]->override_url($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
52 0 ▶ auto_type_munge => sub { $_[0]->auto_type->{data_transfer_obfuscation} = boolean($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
53 ▶ auto_type => sub { }, # TODO - Replace all autotype associations
Subroutine __ANON__: not called CC=1 SCAR=0.0
54 0 ▶ auto_type_enabled => sub { $_[0]->auto_type->{enabled} = boolean($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
55 0 ▶ comment => sub { $_[0]->notes($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
56 0 ▶ tags => sub { $_[0]->tags($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
57 ▶ protected => sub { }, # TODO - Replace all protect flags
Subroutine __ANON__: not called CC=1 SCAR=0.0
58 0 ▶ title => sub { $_[0]->title($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
59 0 ▶ icon => sub { $_[0]->icon_id($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
60 0 ▶ id => sub { $_[0]->uuid(File::KeePass::KDBX::_encode_uuid($_)) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
61 0 ▶ foreground_color => sub { $_[0]->foreground_color($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
62 0 ▶ background_color => sub { $_[0]->background_color($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
63 0 ▶ url => sub { $_[0]->url($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
64 0 ▶ username => sub { $_[0]->username($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
65 0 ▶ password => sub { $_[0]->password($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
66 ▶ history => sub { }, # TODO - Replace all history
Subroutine __ANON__: not called CC=1 SCAR=0.0
67 ▶ strings => sub { }, # TODO - Replace all strings
Subroutine __ANON__: not called CC=1 SCAR=0.0
68 ▶ binary => sub { }, # TODO - Replace all binaries
Subroutine __ANON__: not called CC=1 SCAR=0.0
69 3 );
70  
71 686 ▶sub getters { \%GET }
Subroutine getters: called CC=1 SCAR=0.0
Pod undocumented
72 192 ▶sub setters { \%SET }
Subroutine setters: called CC=1 SCAR=0.0
Pod undocumented
73  
74 3 1;
75  
76 __END__
« KDBX/Tie/GroupList.pm ↑ Summary KDBX/Tie/Group.pm »