Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

marc::charset::table(3pm) [debian man page]

MARC::Charset::Table(3pm)				User Contributed Perl Documentation				 MARC::Charset::Table(3pm)

NAME
MARC::Charset::Table - character mapping db SYNOPSIS
use MARC::Charset::Table; use MARC::Charset::Constants qw(:all); # create the table object my $table = MARC::Charset::Table->new(); # get a code using the marc8 character set code and the character my $code = $table->lookup_by_marc8(CYRILLIC_BASIC, 'K'); # get a code using the utf8 value $code = $table->lookup_by_utf8(chr(0x043A)); DESCRIPTION
MARC::Charset::Table is a wrapper around the character mapping database, which is implemented as a tied hash on disk. This database gets generated by Makefile.PL on installation of MARC::Charset using MARC::Charset::Compiler. The database is essentially a key/value mapping where a key is a MARC-8 character set code + a MARC-8 character, or an integer representing the UCS code point. These keys map to a serialized MARC::Charset::Code object. new() The consturctor. add_code() Add a MARC::Charset::Code to the table. get_code() Retrieve a code using a hash key. lookup_by_marc8() Looks up MARC::Charset::Code entry using a character set code and a MARC-8 value. use MARC::Charset::Constants qw(HEBREW); $code = $table->lookup_by_marc8(HEBREW, chr(0x60)); lookup_by_utf8() Looks up a MARC::Charset::Code object using a utf8 value. db() Returns a reference to a tied character database. MARC::Charset::Table wraps access to the db, but you can get at it if you want. db_path() Returns the path to the character encoding database. Can be called statically too: print MARC::Charset::Table->db_path(); brand_new() An alternate constructor which removes the existing database and starts afresh. Be careful with this one, it's really only used on MARC::Charset installation. perl v5.12.4 2010-09-09 MARC::Charset::Table(3pm)

Check Out this Related Man Page

MARC::File::MicroLIF(3pm)				User Contributed Perl Documentation				 MARC::File::MicroLIF(3pm)

NAME
MARC::File::MicroLIF - MicroLIF-specific file handling SYNOPSIS
use MARC::File::MicroLIF; my $file = MARC::File::MicroLIF->in( $filename ); while ( my $marc = $file->next() ) { # Do something } $file->close(); undef $file; EXPORT
None. The buffer must be large enough to handle any valid record because we don't check for cases like a CR/LF pair or an end-of-record/CR/LF trio being only partially in the buffer. The max valid record is the max MARC record size(99999) plus one or two characters per tag (CR, LF, or CR/LF). It's hard to say what the max number of tags is, so here we use 6000. (6000 tags can be squeezed into a MARC record only if every tag has only one subfield containing a maximum of one character, or if data from multiple tags overlaps in the MARC record body. We're pretty safe.) METHODS
in() Opens a MicroLIF file for reading. Gets the next chunk of data. If $want_line is true then you get the next chunk ending with any combination of and of any length. If it is false or not passed then you get the next chunk ending with x60 followed by any combination of and of any length. All trailing and are stripped. header() If the MicroLIF file has a file header then the header is returned. If the file has no header or the file has not yet been opened then "undef" is returned. decode() Decodes a MicroLIF record and returns a USMARC record. Can be called in one of three different ways: $object->decode( $lif ) MARC::File::MicroLIF->decode( $lif ) MARC::File::MicroLIF::decode( $lif ) TODO
RELATED MODULES
MARC::File LICENSE
This code may be distributed under the same terms as Perl itself. Please note that these modules are not products of or supported by the employers of the various contributors to the code. AUTHOR
Andy Lester, "<andy@petdance.com>" perl v5.10.1 2010-03-29 MARC::File::MicroLIF(3pm)
Man Page