"Fossies" - the Fresh Open Source Software Archive

Member "koha-19.11.15/C4/Patroncards/Layout.pm" (23 Feb 2021, 808 Bytes) of package /linux/misc/koha-19.11.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Layout.pm" see the Fossies "Dox" file reference documentation.

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