Bug 11891: set up tests to require that Koha::Database uses same DB handle as C4...
[koha.git] / C4 / Patroncards / Profile.pm
blob4842b3f3f5213a9c2487411fa4a415e1c1f45b42
1 package C4::Patroncards::Profile;
3 use strict;
4 use warnings;
6 use base qw(C4::Creators::Profile);
8 use autouse 'Data::Dumper' => qw(Dumper);
10 BEGIN {
11 use version; our $VERSION = qv('3.07.00.049');
14 __PACKAGE__ =~ m/^C4::(.+)::.+$/;
15 my $me = $1;
17 sub new {
18 my $self = shift;
19 push @_, "creator", $me;
20 return $self->SUPER::new(@_);
23 sub save {
24 my $self = shift;
25 push @_, "creator", $me;
26 return $self->SUPER::save(@_);
29 sub retrieve {
30 my $self = shift;
31 push @_, "creator", $me;
32 return $self->SUPER::retrieve(@_);
35 sub delete {
36 if (ref($_[0])) {
37 my $self = shift; # check to see if this is a method call
38 push @_, "creator", $me;
39 return $self->SUPER::delete(@_);
41 else {
42 push @_, "creator", $me;
43 return __PACKAGE__->SUPER::delete(@_); # XXX: is this too hackish?