From af8c7f1e2531df9592cc38e857d253dd17afceb5 Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Thu, 29 Mar 2012 18:35:04 +0100 Subject: [PATCH] bug 7284: fix package build problem, move BEGIN into new --- C4/Heading/UNIMARC.pm | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/C4/Heading/UNIMARC.pm b/C4/Heading/UNIMARC.pm index 78536b8..7925345 100644 --- a/C4/Heading/UNIMARC.pm +++ b/C4/Heading/UNIMARC.pm @@ -59,7 +59,17 @@ my %subdivisions = ( my $bib_heading_fields; -BEGIN { +=head1 METHODS + +=head2 new + + my $marc_handler = C4::Heading::UNIMARC->new(); + +=cut + +sub new { + my $class = shift; + my $dbh = C4::Context->dbh; my $sth = $dbh->prepare( "SELECT tagfield, authtypecode @@ -74,18 +84,7 @@ BEGIN { subfields => 'abcdefghjklmnopqrstvxyz', }; } -} - -=head1 METHODS -=head2 new - - my $marc_handler = C4::Heading::UNIMARC->new(); - -=cut - -sub new { - my $class = shift; return bless {}, $class; } -- 1.7.2.5