Commit f59595d9 authored by Joe Atzberger's avatar Joe Atzberger Committed by Joshua Ferraro

C4 - BEGIN blocks and 1; __END__ for modules

Signed-off-by: default avatarChris Cormack <crc@liblime.com>
Signed-off-by: default avatarJoshua Ferraro <jmf@liblime.com>
parent 14b03814
......@@ -19,16 +19,22 @@ package C4::Amazon;
use XML::Simple;
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request::Common;
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT);
$VERSION = 0.02;
BEGIN {
require Exporter;
$VERSION = 0.03;
@ISA = qw(Exporter);
@EXPORT = qw(
&get_amazon_details
&check_search_inside
);
}
=head1 NAME
......@@ -38,15 +44,6 @@ C4::Amazon - Functions for retrieving Amazon.com content in Koha
This module provides facilities for retrieving Amazon.com content in Koha
=cut
@ISA = qw(Exporter);
@EXPORT = qw(
&get_amazon_details
&check_search_inside
);
=head1 get_amazon_details($isbn);
=head2 $isbn is a isbn string
......@@ -99,6 +96,9 @@ sub check_search_inside {
return $available;
}
1;
__END__
=head1 NOTES
=head1 AUTHOR
......@@ -106,4 +106,3 @@ sub check_search_inside {
Joshua Ferraro <jmf@liblime.com>
=cut
1;
......@@ -17,7 +17,6 @@ package C4::AuthoritiesMarc;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
require Exporter;
use C4::Context;
use C4::Koha;
use MARC::Record;
......@@ -28,34 +27,37 @@ use C4::AuthoritiesMarc::UNIMARC;
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
$VERSION = 3.00;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetTagsLabels
&GetAuthType
&GetAuthTypeCode
&GetAuthMARCFromKohaField
&AUTHhtml2marc
&AddAuthority
&ModAuthority
&DelAuthority
&GetAuthority
&GetAuthorityXML
BEGIN {
# set the version for version checking
$VERSION = 3.01;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetTagsLabels
&GetAuthType
&GetAuthTypeCode
&GetAuthMARCFromKohaField
&AUTHhtml2marc
&AddAuthority
&ModAuthority
&DelAuthority
&GetAuthority
&GetAuthorityXML
&CountUsage
&CountUsageChildren
&SearchAuthorities
&CountUsage
&CountUsageChildren
&SearchAuthorities
&BuildSummary
&BuildUnimarcHierarchies
&BuildUnimarcHierarchy
&BuildSummary
&BuildUnimarcHierarchies
&BuildUnimarcHierarchy
&merge
&FindDuplicateAuthority
);
&merge
&FindDuplicateAuthority
);
}
=head2 GetAuthMARCFromKohaField
......@@ -95,6 +97,7 @@ returns ref to array result and count of results returned
=back
=cut
sub SearchAuthorities {
my ($tags, $and_or, $excluding, $operator, $value, $offset,$length,$authtypecode,$sortby) = @_;
# warn "CALL : $tags, $and_or, $excluding, $operator, $value, $offset,$length,$authtypecode,$sortby";
......@@ -372,6 +375,7 @@ counts Usage of narrower terms of Authid in bibliorecords.
=back
=cut
sub CountUsageChildren {
my ($authid) = @_;
}
......@@ -386,6 +390,7 @@ returns authtypecode of an authid
=back
=cut
sub GetAuthTypeCode {
#AUTHfind_authtypecode
my ($authid) = @_;
......@@ -422,6 +427,7 @@ where attribute takes values in :
=back
=cut
sub GetTagsLabels {
my ($forlibrarian,$authtypecode)= @_;
my $dbh=C4::Context->dbh;
......@@ -504,6 +510,7 @@ Either Create Or Modify existing authority.
=back
=cut
sub AddAuthority {
# pass the MARC::Record to this function, and it will create the records in the authority table
my ($record,$authid,$authtypecode) = @_;
......@@ -627,6 +634,7 @@ returns xml form of record $authid
=back
=cut
sub GetAuthorityXML {
# Returns MARC::XML of the authority passed in parameter.
my ( $authid ) = @_;
......@@ -660,6 +668,7 @@ Returns MARC::Record of the authority passed in parameter.
=back
=cut
sub GetAuthority {
my ($authid)=@_;
my $dbh=C4::Context->dbh;
......@@ -688,6 +697,7 @@ else
=back
=cut
sub GetAuthType {
my ($authtypecode) = @_;
my $dbh=C4::Context->dbh;
......@@ -983,6 +993,7 @@ Example of text:
=back
=cut
sub BuildUnimarcHierarchies{
my $authid = shift @_;
# warn "authid : $authid";
......@@ -1046,6 +1057,7 @@ Those two latest ones should disappear soon.
=back
=cut
sub BuildUnimarcHierarchy{
my $record = shift @_;
my $class = shift @_;
......@@ -1085,6 +1097,7 @@ return a hashref in order auth_header table data
=back
=cut
sub GetHeaderAuthority{
my $authid = shift @_;
my $sql= "SELECT * from auth_header WHERE authid = ?";
......@@ -1128,6 +1141,7 @@ Then we should add some new parameter : bibliotargettag, authtargettag
=back
=cut
sub merge {
my ($mergefrom,$MARCfrom,$mergeto,$MARCto) = @_;
my $dbh=C4::Context->dbh;
......@@ -1290,6 +1304,9 @@ sub get_auth_type_location {
END { } # module clean-up code here (global destructor)
1;
__END__
=head1 AUTHOR
Koha Developement team <info@koha.org>
......@@ -1297,3 +1314,4 @@ Koha Developement team <info@koha.org>
Paul POULAIN paul.poulain@free.fr
=cut
......@@ -25,8 +25,10 @@ use Digest::MD5;
use vars qw($VERSION);
# set the version for version checking
$VERSION = 3.00;
BEGIN {
# set the version for version checking
$VERSION = 3.00;
}
=head1 NAME
......@@ -305,6 +307,9 @@ sub fetch {
return $self;
}
1;
__END__
=head1 AUTHOR
Koha Development Team <info@koha.org>
......
......@@ -23,8 +23,28 @@ use C4::Koha;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
$VERSION = 3.00;
BEGIN {
# set the version for version checking
$VERSION = 3.01;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetBranchCategory
&GetBranchName
&GetBranch
&GetBranches
&GetBranchDetail
&get_branchinfos_of
&ModBranch
&CheckBranchCategorycode
&GetBranchInfo
&GetCategoryTypes
&GetBranchCategories
&GetBranchesInCategory
&ModBranchCategoryInfo
&DelBranch
&DelBranchCategory
);
}
=head1 NAME
......@@ -40,27 +60,6 @@ The functions in this module deal with branches.
=head1 FUNCTIONS
=cut
@ISA = qw(Exporter);
@EXPORT = qw(
&GetBranchCategory
&GetBranchName
&GetBranch
&GetBranches
&GetBranchDetail
&get_branchinfos_of
&ModBranch
&CheckBranchCategorycode
&GetBranchInfo
&GetCategoryTypes
&GetBranchCategories
&GetBranchesInCategory
&ModBranchCategoryInfo
&DelBranch
&DelBranchCategory
);
=head2 GetBranches
$branches = &GetBranches();
......@@ -84,7 +83,6 @@ foreach my $thisbranch (keys %$branches) {
push @branchloop, \%row;
}
=head3 in TEMPLATE
<select name="branch">
<option value="">Default</option>
......@@ -523,7 +521,8 @@ sub CheckBranchCategorycode {
return $total;
}
1;
__END__
=head1 AUTHOR
......
......@@ -22,12 +22,16 @@ use C4::Biblio;
use C4::Koha;
use MARC::File::USMARC;
use C4::ImportBatch;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
$VERSION = 0.01;
BEGIN {
# set the version for version checking
$VERSION = 0.02;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(&ImportBreeding &BreedingSearch);
}
=head1 NAME
......@@ -56,11 +60,6 @@ C4::Breeding : module to add biblios to import_records via
works perfectly with BNF server, that sends UNIMARC latin1 records. Should work with other servers too.
the FixEncoding sub is in Koha.pm, as it's a general usage sub.
=cut
@ISA = qw(Exporter);
@EXPORT = qw(&ImportBreeding &BreedingSearch);
=head2 ImportBreeding
ImportBreeding($marcrecords,$overwrite_biblio,$filename,$encoding,$z3950random,$batch_type);
......@@ -213,5 +212,6 @@ sub BreedingSearch {
return($count, @results);
} # sub breedingsearch
1;
__END__
END { } # module clean-up code here (global destructor)
......@@ -24,12 +24,18 @@ use Mail::Sendmail;
# use C4::Suggestions;
use C4::Members;
use C4::Log;
require Exporter;
our ( $VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
$VERSION = 3.00;
BEGIN {
require Exporter;
# set the version for version checking
$VERSION = 3.01;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts
);
}
=head1 NAME
......@@ -48,10 +54,6 @@ C4::Letters - Give functions for Letters management
=cut
@ISA = qw(Exporter);
@EXPORT =
qw(&GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts);
=head2 GetLetters
$letters = &getletters($category);
......@@ -485,4 +487,5 @@ sub parseletter {
}
}
END { } # module clean-up code here (global destructor)
1;
__END__
......@@ -25,8 +25,10 @@ use IO::File;
use vars qw($VERSION);
# set the version for version checking
$VERSION = 3.00;
BEGIN {
# set the version for version checking
$VERSION = 3.00;
}
=head1 NAME
......@@ -315,6 +317,9 @@ sub fh {
return $self->{'fh'};
}
1;
__END__
=head1 AUTHOR
Koha Development Team <info@koha.org>
......
......@@ -26,27 +26,28 @@ use LWP::UserAgent;
use HTTP::Request::Common;
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 3.0;
BEGIN {
require Exporter;
$VERSION = 3.01;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
&get_xisbns
&get_biblio_from_xisbn
);
}
=head1 NAME
C4::XISBN - Functions for retrieving XISBN content in Koha
=head1 FUNCTIONS
This module provides facilities for retrieving XISBN, ThingISBN and XISBN content in Koha
This module provides facilities for retrieving ThingISBN and XISBN content in Koha
=cut
@ISA = qw(Exporter);
@EXPORT_OK = qw(
&get_xisbns
&get_biblio_from_xisbn
);
sub get_biblio_from_xisbn {
my $xisbn = shift;
my $dbh = C4::Context->dbh;
......@@ -60,8 +61,8 @@ sub get_biblio_from_xisbn {
$xbiblio->{items} = GetItemsByBiblioitemnumber($xbib_data->{biblionumber});
}
return ($xbiblio);
}
=head1 get_xisbns($isbn);
=head2 $isbn is an ISBN string
......@@ -155,9 +156,14 @@ sub _service_throttle {
return undef;
}
1;
__END__
=head1 NOTES
=head1 AUTHOR
Joshua Ferraro <jmf@liblime.com>
=cut
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment