File Coverage

File:C4/Patroncards/Profile.pm
Coverage:51.2%

linestmtbrancondsubtimecode
1package C4::Patroncards::Profile;
2
3
6
6
6
42956
27
216
use strict;
4
6
6
6
40
24
264
use warnings;
5
6
6
6
6
39
54
679
use base qw(C4::Creators::Profile);
7
8
6
6
6
44
70
97
use autouse 'Data::Dumper' => qw(Dumper);
9
10BEGIN {
11
6
6
6
6
1426
20
70
507
    use version; our $VERSION = qv('1.0.0_1');
12}
13
14__PACKAGE__ =~ m/^C4::(.+)::.+$/;
15my $me = $1;
16
17sub new {
18
0
    my $self = shift;
19
0
    push @_, "creator", $me;
20
0
    return $self->SUPER::new(@_);
21}
22
23sub save {
24
0
    my $self = shift;
25
0
    push @_, "creator", $me;
26
0
    return $self->SUPER::save(@_);
27}
28
29sub retrieve {
30
0
    my $self = shift;
31
0
    push @_, "creator", $me;
32
0
    return $self->SUPER::retrieve(@_);
33}
34
35sub delete {
36
0
    if (ref($_[0])) {
37
0
        my $self = shift; # check to see if this is a method call
38
0
        push @_, "creator", $me;
39
0
        return $self->SUPER::delete(@_);
40    }
41    else {
42
0
        push @_, "creator", $me;
43
0
        return __PACKAGE__->SUPER::delete(@_); # XXX: is this too hackish?
44    }
45}
46
471;