Commit aa9b4d92 authored by Andrew Elwell's avatar Andrew Elwell Committed by Galen Charlton

POD Cleanups

Signed-off-by: Andrew Elwell's avatarAndrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton's avatarGalen Charlton <gmcharlt@gmail.com>
parent 546a0244
......@@ -90,26 +90,48 @@ These are read-only accessors for attributes of a C4::Category object.
=head3 $category->categorycode
=cut
=head3 $category->description
=cut
=head3 $category->enrolmentperiod
=cut
=head3 $category->upperagelimit
=cut
=head3 $category->dateofbirthrequired
=cut
=head3 $category->finetype
=cut
=head3 $category->bulk
=cut
=head3 $category->enrolmentfee
=cut
=head3 $category->overduenoticerequired
=cut
=head3 $category->issuelimit
=cut
=head3 $category->reservefee
=cut
=head3 $category->category_type
=cut
......
......@@ -47,7 +47,7 @@ C4::Charset - utilities for handling character set conversions.
=head1 SYNOPSIS
use C4::Charset;
use C4::Charset;
=head1 DESCRIPTION
......@@ -76,16 +76,12 @@ on how to deal with the situation.
=head2 IsStringUTF8ish
=over 4
my $is_utf8 = IsStringUTF8ish($str);
=back
my $is_utf8 = IsStringUTF8ish($str);
Determines if C<$str> is valid UTF-8. This can mean
one of two things:
=over 2
=over
=item *
......@@ -115,11 +111,7 @@ sub IsStringUTF8ish {
=head2 SetUTF8Flag
=over 4
my $marc_record = SetUTF8Flag($marc_record);
=back
my $marc_record = SetUTF8Flag($marc_record);
This function sets the PERL UTF8 flag for data.
It is required when using new_from_usmarc
......@@ -156,24 +148,21 @@ sub SetUTF8Flag{
=head2 NormalizeString
=over 4
my $normalized_string=NormalizeString($string);
=back
Given a string
Given
a string
nfc : If you want to set NFC and not NFD
transform : If you expect all the signs to be removed
Sets the PERL UTF8 Flag on your initial data if need be
and applies cleaning if required
Returns a utf8 NFD normalized string
Sample code :
my $string=NormalizeString ("l'ornithoptère");
nfc : If you want to set NFC and not NFD
transform : If you expect all the signs to be removed
Sets the PERL UTF8 Flag on your initial data if need be
and applies cleaning if required
Returns a utf8 NFD normalized string
Sample code :
my $string=NormalizeString ("l'ornithoptère");
#results into ornithoptère in NFD form and sets UTF8 Flag
=cut
sub NormalizeString{
......@@ -196,11 +185,8 @@ sub NormalizeString{
=head2 MarcToUTF8Record
=over 4
($marc_record, $converted_from, $errors_arrayref) = MarcToUTF8Record($marc_blob, $marc_flavour, [, $source_encoding]);
=back
($marc_record, $converted_from, $errors_arrayref) = MarcToUTF8Record($marc_blob,
$marc_flavour, [, $source_encoding]);
Given a MARC blob or a C<MARC::Record>, the MARC flavour, and an
optional source encoding, return a C<MARC::Record> that is
......@@ -313,11 +299,7 @@ sub MarcToUTF8Record {
=head2 SetMarcUnicodeFlag
=over 4
SetMarcUnicodeFlag($marc_record, $marc_flavour);
=back
SetMarcUnicodeFlag($marc_record, $marc_flavour);
Set both the internal MARC::Record encoding flag
and the appropriate Leader/09 (MARC21) or
......@@ -364,11 +346,7 @@ sub SetMarcUnicodeFlag {
=head2 StripNonXmlChars
=over 4
my $new_str = StripNonXmlChars($old_str);
=back
my $new_str = StripNonXmlChars($old_str);
Given a string, return a copy with the
characters that are illegal in XML
......@@ -404,11 +382,7 @@ sub StripNonXmlChars {
=head2 _default_marc21_charconv_to_utf8
=over 4
my ($new_marc_record, $guessed_charset) = _default_marc21_charconv_to_utf8($marc_record);
=back
my ($new_marc_record, $guessed_charset) = _default_marc21_charconv_to_utf8($marc_record);
Converts a C<MARC::Record> of unknown character set to UTF-8,
first by trying a MARC-8 to UTF-8 conversion, then ISO-8859-1
......@@ -450,11 +424,7 @@ sub _default_marc21_charconv_to_utf8 {
=head2 _default_unimarc_charconv_to_utf8
=over 4
my ($new_marc_record, $guessed_charset) = _default_unimarc_charconv_to_utf8($marc_record);
=back
my ($new_marc_record, $guessed_charset) = _default_unimarc_charconv_to_utf8($marc_record);
Converts a C<MARC::Record> of unknown character set to UTF-8,
first by trying a ISO-5426 to UTF-8 conversion, then ISO-8859-1
......@@ -494,11 +464,7 @@ sub _default_unimarc_charconv_to_utf8 {
=head2 _marc_marc8_to_utf8
=over 4
my @errors = _marc_marc8_to_utf8($marc_record, $marc_flavour, $source_encoding);
=back
my @errors = _marc_marc8_to_utf8($marc_record, $marc_flavour, $source_encoding);
Convert a C<MARC::Record> to UTF-8 in-place from MARC-8.
If the conversion fails for some reason, an
......@@ -569,11 +535,7 @@ sub _marc_marc8_to_utf8 {
=head2 _marc_iso5426_to_utf8
=over 4
my @errors = _marc_iso5426_to_utf8($marc_record, $marc_flavour, $source_encoding);
=back
my @errors = _marc_iso5426_to_utf8($marc_record, $marc_flavour, $source_encoding);
Convert a C<MARC::Record> to UTF-8 in-place from ISO-5426.
If the conversion fails for some reason, an
......@@ -615,11 +577,7 @@ sub _marc_iso5426_to_utf8 {
=head2 _marc_to_utf8_via_text_iconv
=over 4
my @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, $source_encoding);
=back
my @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, $source_encoding);
Convert a C<MARC::Record> to UTF-8 in-place using the
C<Text::Iconv> CPAN module. Any source encoding accepted
......@@ -688,11 +646,7 @@ sub _marc_to_utf8_via_text_iconv {
=head2 _marc_to_utf8_replacement_char
=over 4
_marc_to_utf8_replacement_char($marc_record, $marc_flavour);
=back
_marc_to_utf8_replacement_char($marc_record, $marc_flavour);
Convert a C<MARC::Record> to UTF-8 in-place, adopting the
unsatisfactory method of replacing all non-ASCII (e.g.,
......@@ -731,11 +685,7 @@ sub _marc_to_utf8_replacement_char {
=head2 char_decode5426
=over 4
my $utf8string = char_decode5426($iso_5426_string);
=back
my $utf8string = char_decode5426($iso_5426_string);
Converts a string from ISO-5426 to UTF-8.
......
This diff is collapsed.
......@@ -33,12 +33,12 @@ C4::Heading
=head1 SYNOPSIS
use C4::Heading;
my $heading = C4::Heading->new_from_bib_field($field);
my $thesaurus = $heading->thesaurus();
my $type = $heading->type();
my $display_heading = $heading->display();
my $search_string = $heading->search_string();
use C4::Heading;
my $heading = C4::Heading->new_from_bib_field($field);
my $thesaurus = $heading->thesaurus();
my $type = $heading->type();
my $display_heading = $heading->display();
my $search_string = $heading->search_string();
=head1 DESCRIPTION
......@@ -49,11 +49,7 @@ headings found in bibliographic and authority records.
=head2 new_from_bib_field
=over 4
my $heading = C4::Heading->new_from_bib_field($field[, $marc_flavour]);
=back
my $heading = C4::Heading->new_from_bib_field($field[, $marc_flavour]);
Given a C<MARC::Field> object containing a heading from a
bib record, create a C<C4::Heading> object.
......@@ -88,11 +84,7 @@ sub new_from_bib_field {
=head2 display_form
=over 4
my $display = $heading->display_form();
=back
my $display = $heading->display_form();
Return the "canonical" display form of the heading.
......@@ -105,11 +97,7 @@ sub display_form {
=head2 authorities
=over 4
my $authorities = $heading->authorities;
=back
my $authorities = $heading->authorities;
Return a list of authority records for this
heading.
......@@ -126,11 +114,7 @@ sub authorities {
=head2 preferred_authorities
=over 4
my $preferred_authorities = $heading->preferred_authorities;
=back
my $preferred_authorities = $heading->preferred_authorities;
Return a list of authority records for headings
that are a preferred form of the heading.
......
This diff is collapsed.
......@@ -30,35 +30,25 @@ C4::Installer
=head1 SYNOPSIS
use C4::Installer;
my $installer = C4::Installer->new();
my $all_languages = getAllLanguages();
my $error = $installer->load_db_schema();
my $list = $installer->sql_file_list('en', 'marc21', { optional => 1, mandatory => 1 });
my ($fwk_language, $error_list) = $installer->load_sql_in_order($all_languages, @$list);
$installer->set_version_syspref();
$installer->set_marcflavour_syspref('MARC21');
$installer->set_indexing_engine(0);
use C4::Installer;
my $installer = C4::Installer->new();
my $all_languages = getAllLanguages();
my $error = $installer->load_db_schema();
my $list = $installer->sql_file_list('en', 'marc21', { optional => 1, mandatory => 1 });
my ($fwk_language, $error_list) = $installer->load_sql_in_order($all_languages, @$list);
$installer->set_version_syspref();
$installer->set_marcflavour_syspref('MARC21');
$installer->set_indexing_engine(0);
=head1 DESCRIPTION
=cut
=head1 METHODS
=head2 new
=over 4
my $installer = C4::Installer->new();
=back
my $installer = C4::Installer->new();
Creates a new installer.
......@@ -90,11 +80,7 @@ sub new {
=head2 marcflavour_list
=over 4
my ($marcflavours) = $installer->marcflavour_list($lang);
=back
my ($marcflavours) = $installer->marcflavour_list($lang);
Return a arrayref of the MARC flavour sets available for the
specified language C<$lang>. Returns 'undef' if a directory
......@@ -115,11 +101,8 @@ sub marcflavour_list {
=head2 marc_framework_sql_list
=over 4
my ($defaulted_to_en, $list) = $installer->marc_framework_sql_list($lang, $marcflavour);
=back
my ($defaulted_to_en, $list) =
$installer->marc_framework_sql_list($lang, $marcflavour);
Returns in C<$list> a structure listing the filename, description, section,
and mandatory/optional status of MARC framework scripts available for C<$lang>
......@@ -200,11 +183,7 @@ sub marc_framework_sql_list {
=head2 sample_data_sql_list
=over 4
my ($defaulted_to_en, $list) = $installer->sample_data_sql_list($lang);
=back
my ($defaulted_to_en, $list) = $installer->sample_data_sql_list($lang);
Returns in C<$list> a structure listing the filename, description, section,
and mandatory/optional status of sample data scripts available for C<$lang>.
......@@ -281,11 +260,7 @@ sub sample_data_sql_list {
=head2 sql_file_list
=over 4
my $list = $installer->sql_file_list($lang, $marcflavour, $subset_wanted);
=back
my $list = $installer->sql_file_list($lang, $marcflavour, $subset_wanted);
Returns an arrayref containing the filepaths of installer SQL scripts
available for laod. The C<$lang> and C<$marcflavour> arguments
......@@ -320,11 +295,7 @@ sub sql_file_list {
=head2 load_db_schema
=over 4
my $error = $installer->load_db_schema();
=back
my $error = $installer->load_db_schema();
Loads the SQL script that creates Koha's tables and indexes. The
return value is a string containing error messages reported by the
......@@ -343,11 +314,7 @@ sub load_db_schema {
=head2 load_sql_in_order
=over 4
my ($fwk_language, $list) = $installer->load_sql_in_order($all_languages, @sql_list);
=back
my ($fwk_language, $list) = $installer->load_sql_in_order($all_languages, @sql_list);
Given a list of SQL scripts supplied in C<@sql_list>, loads each of them
into the database and sets the FrameworksLoaded system preference to names
......@@ -358,15 +325,15 @@ directory path). This means that dependencies among the scripts are to
be resolved by carefully naming them, keeping in mind that the directory name
does *not* currently count.
FIXME: this is a rather delicate way of dealing with dependencies between
the install scripts.
B<FIXME:> this is a rather delicate way of dealing with dependencies between
the install scripts.
The return value C<$list> is an arrayref containing a hashref for each
"level" or directory containing SQL scripts; the hashref in turns contains
a list of hashrefs containing a list of each script load and any error
messages associated with the loading of each script.
FIXME: The C<$fwk_language> code probably doesn't belong and needs to be
B<FIXME:> The C<$fwk_language> code probably doesn't belong and needs to be
moved to a different method.
=cut
......@@ -433,11 +400,7 @@ sub load_sql_in_order {
=head2 set_marcflavour_syspref
=over 4
$installer->set_marcflavour_syspref($marcflavour);
=back
$installer->set_marcflavour_syspref($marcflavour);
Set the 'marcflavour' system preference. The incoming
C<$marcflavour> references to a subdirectory of
......@@ -466,11 +429,7 @@ sub set_marcflavour_syspref {
=head2 set_indexing_engine
=over 4
$installer->set_indexing_engine($nozebra);
=back
$installer->set_indexing_engine($nozebra);
Sets system preferences related to the indexing
engine. The C<$nozebra> argument is a boolean;
......@@ -495,11 +454,7 @@ sub set_indexing_engine {
=head2 set_version_syspref
=over 4
$installer->set_version_syspref();
=back
$installer->set_version_syspref();
Set or update the 'Version' system preference to the current
Koha software version.
......@@ -526,24 +481,20 @@ sub set_version_syspref {
=head2 load_sql
=over 4
my $error = $installer->load_sql($filename);
=back
my $error = $installer->load_sql($filename);
Runs a the specified SQL using the DB's command-line
SQL tool, and returns any strings sent to STDERR
by the command-line tool.
FIXME: there has been a long-standing desire to
replace this with an SQL loader that goes
through DBI; partly for portability issues
and partly to improve error handling.
B<FIXME:> there has been a long-standing desire to
replace this with an SQL loader that goes
through DBI; partly for portability issues
and partly to improve error handling.
FIXME: even using the command-line loader, some more
basic error handling should be added - deal
with missing files, e.g.
B<FIXME:> even using the command-line loader, some more
basic error handling should be added - deal
with missing files, e.g.
=cut
......@@ -582,11 +533,7 @@ sub load_sql {
=head2 get_file_path_from_name
=over 4
my $filename = $installer->get_file_path_from_name('script_name');
=back
my $filename = $installer->get_file_path_from_name('script_name');
searches through the set of known SQL scripts and finds the fully
qualified path name for the script that mathches the input.
......
......@@ -377,12 +377,20 @@ These are read-only accessors for the various attributes of a preference.
=head3 $pref->id
=cut
=head3 $pref->branchcode
=cut
=head3 $pref->categorycode
=cut
=head3 $pref->item_type
=cut
=head3 $pref->notification
=cut
......
......@@ -90,16 +90,28 @@ These are read-only accessors for attributes of a C4::ItemType object.
=head3 $itemtype->itemtype
=cut
=head3 $itemtype->description
=cut
=head3 $itemtype->renewalsallowed
=cut
=head3 $itemtype->rentalcharge
=cut
=head3 $itemtype->notforloan
=cut
=head3 $itemtype->imageurl
=cut
=head3 $itemtype->summary
=cut
......
......@@ -65,6 +65,8 @@ use C4::Languages;
=head1 DESCRIPTION
=cut
=head1 FUNCTIONS
=head2 getFrameworkLanguages
......
......@@ -154,7 +154,7 @@ sub addalert ($$$) {
parameters :
- alertid : the alert id
deletes the alert
=cut
sub delalert ($) {
......@@ -552,9 +552,8 @@ sub parseletter {
=head2 EnqueueLetter
=over 4
my $success = EnqueueLetter( { letter => $letter, borrowernumber => '12', message_transport_type => 'email' } )
my $success = EnqueueLetter( { letter => $letter,
borrowernumber => '12', message_transport_type => 'email' } )
places a letter in the message_queue database table, which will
eventually get processed (sent) by the process_message_queue.pl
......@@ -562,8 +561,6 @@ cronjob when it calls SendQueuedMessages.
return true on success
=back
=cut
sub EnqueueLetter ($) {
......@@ -609,16 +606,12 @@ ENDSQL
=head2 SendQueuedMessages ([$hashref])
=over 4
my $sent = SendQueuedMessages( { verbose => 1 } );
sends all of the 'pending' items in the message queue.
my $sent = SendQueuedMessages( { verbose => 1 } );
returns number of messages sent.
=back
=cut
sub SendQueuedMessages (;$) {
......@@ -645,14 +638,10 @@ sub SendQueuedMessages (;$) {
=head2 GetRSSMessages
=over 4
my $message_list = GetRSSMessages( { limit => 10, borrowernumber => '14' } )
my $message_list = GetRSSMessages( { limit => 10, borrowernumber => '14' } )
returns a listref of all queued RSS messages for a particular person.
=back
=cut
sub GetRSSMessages {
......@@ -669,15 +658,11 @@ sub GetRSSMessages {
=head2 GetPrintMessages
=over 4
my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
Returns a arrayref of all queued print messages (optionally, for a particular
person).
=back
=cut
sub GetPrintMessages {
......@@ -689,17 +674,13 @@ sub GetPrintMessages {
=head2 GetQueuedMessages ([$hashref])
=over 4
my $messages = GetQueuedMessage( { borrowernumber => '123', limit => 20 } );
my $messages = GetQueuedMessage( { borrowernumber => '123', limit => 20 } );
fetches messages out of the message queue.
returns:
list of hashes, each has represents a message in the message queue.
=back
=cut
sub GetQueuedMessages {
......
......@@ -19,7 +19,7 @@ How to add a new message to the queue:
my $borrower = { borrowernumber => 1 };
my $item = C4::Items::GetItem(1);
my $letter = C4::Letters::getletter('circulation', 'CHECKOUT');
C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber});
C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber});
C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber});
C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email');
......@@ -33,10 +33,11 @@ How to update a borrower's last checkout message:
=head1 DESCRIPTION
This module presents an OO interface to the message_queue. Previously, you could
only add messages to the message_queue via C<C4::Letters::EnqueueMessage()>. With
this module, you can also get previously inserted messages, manipulate them, and
save them back to the database.
This module presents an OO interface to the message_queue. Previously,
you could only add messages to the message_queue via
C<C4::Letters::EnqueueMessage()>. With this module, you can also get
previously inserted messages, manipulate them, and save them back to the
database.
=cut
......@@ -302,26 +303,48 @@ sub append {
=head3 $message->message_id
=cut
=head3 $message->borrowernumber
=cut
=head3 $message->subject
=cut
=head3 $message->content
=cut
=head3 $message->metadata
=cut
=head3 $message->letter_code
=cut
=head3 $message->message_transport_type
=cut
=head3 $message->status
=cut
=head3 $message->time_queued
=cut
=head3 $message->to_address
=cut
=head3 $message->from_address
=cut
=head3 $message->content_type
=cut
......
......@@ -48,9 +48,7 @@ The functions in this module handle sending text to a printer.
=head1 FUNCTIONS
=over 2
=item remoteprint
=head2 remoteprint
&remoteprint($items, $borrower);
......@@ -168,12 +166,12 @@ EOF
return $slip;
}
=item printslip
=head2 printslip
&printslip($borrowernumber)
print a slip for the given $borrowernumber