Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.546.726 Times

Parse::Binary::FixedFormat::Variants 0.10

  Date Added: July 15, 2010  |  Visits: 607

Parse::Binary::FixedFormat::Variants

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 downloads)



Parse::Binary::FixedFormat::Variants is a Perl module to convert between variant records and hashes. Parse::Binary::FixedFormat supports variant record formats. To describe a variant structure, pass a hash reference containing the following elements to new. The object returned to handle variant records will be a Parse::Binary::FixedFormat::Variants. Chooser When converting a buffer to a hash, this subroutine is invoked after applying the first format to the buffer. The generated hash reference is passed to this routine. Any field names specified in the first format are available to be used in making a decision on which format to use to decipher the buffer. This routine should return the index of the proper format specification. When converting a hash to a buffer, this subroutine is invoked first to choose a packing format. Since the same function is used for both conversions, this function should restrict itself to field names that exist in format 0 and those fields should exist in the same place in all formats. Formats This is a reference to a list of formats. Each format contains a list of field specifications. For example: my $cvt = new Parse::Binary::FixedFormat { Chooser => sub { my $rec=shift; $rec->{RecordType} eq 0 ? 1 : 2 }, Formats => [ [ RecordType:A1 ], [ RecordType:A1, FieldA:A6, FieldB:A4:4 ], [ RecordType:A1, FieldC:A4, FieldD:A18 ] ] }; my $rec0 = $cvt->unformat("0FieldAB[0]B[1]B[2]B[3]"); my $rec1 = $cvt->unformat("1FldC<-----FieldD----->"); In the above example, the Chooser function looks at the contents of the RecordType field. If it contains a 0, format 1 is used. Otherwise, format 2 is used. Parse::Binary::FixedFormat::Variants can be used is if it were a Parse::Binary::FixedFormat. The format and unformat methods will determine which variant to use automatically. The blank method requires an argument that specifies the variant number..

Requirements: No special requirements
Platforms: Linux
Keyword: Convert Fixedformat Format Formats Libraries Parsebinaryfixedformatvariants Perl Module Programming Records Recordtype Used Variant Variant Records
Users rating: 0/10

License: Freeware Size: 31.74 KB
USER REVIEWS
More Reviews or Write Review


PARSE::BINARY::FIXEDFORMAT::VARIANTS RELATED
Libraries  -  DateTime::Format::Excel 0.2901
DateTime::Format::Excel is a Perl module that can convert between DateTime and Excel dates. SYNOPSIS use DateTime::Format::Excel; # From Excel via class method: my $datetime = DateTime::Format::Excel->parse_datetime( 37680 ); print...
15.36 KB  
Libraries  -  DateTime::Format::Epoch 0.10
DateTime::Format::Epoch is a Perl module that can convert DateTimes to/from epoch seconds. SYNOPSIS use DateTime::Format::Epoch; my $dt = DateTime->new( year => 1970, month => 1, day => 1 ); my $formatter = DateTime::Format::Epoch->new(...
17.41 KB  
Libraries  -  DateTime::Format::Epoch::JD 0.10
DateTime::Format::Epoch::JD is Perl module Convert DateTimes to/from Julian Days. SYNOPSIS use DateTime::Format::Epoch::JD; my $dt = DateTime::Format::Epoch::JD->parse_datetime( 2453244.5 ); # 2004-08-27T00:00:00...
17.41 KB  
Libraries  -  DateTime::Format::Pg 0.15
DateTime::Format::Pg is a Perl module to parse and format PostgreSQL dates and times. SYNOPSIS use DateTime::Format::Pg; my $dt = DateTime::Format::Pg->parse_datetime( 2003-01-16 23:12:01 ); # 2003-01-16T23:12:01+0200...
19.46 KB  
Libraries  -  DateTime::Format::Builder 0.7807
DateTime::Format::Builder is a Perl module to create datetime parser classes and objects. SYNOPSIS package DateTime::Format::Brief; our $VERSION = 0.07; use DateTime::Format::Builder ( parsers => { parse_datetime => [ { regex =>...
48.13 KB  
Libraries  -  DateTime::Format::Roman 0.03
DateTime::Format::Roman is a Perl module with roman day numbering for DateTime objects. SYNOPSIS use DateTime::Format::Roman; my $formatter = DateTime::Format::Roman->new( pattern => %d %f %b %y ); my $dt = DateTime->new( year => 2003,...
11.26 KB  
Libraries  -  AnyData::Format::XML 0.10
AnyData::Format::XML is a Perl module for tiedhash and DBI access to XML. SYNOPSIS # access XML data via a multi-dimensional tied hash # see AnyData.pod for full details # use AnyData; my $table = adTie( XML, $file, $mode, $flags ); OR...
44.03 KB  
Libraries  -  Convert::EBCDIC 0.06
Convert::EBCDIC, ascii2ebcdic, ebcdic2ascii is a Perl module for string conversion between EBCDIC and ASCII. SYNOPSIS use Convert::EBCDIC; $ascii_string = ebcdic2ascii($ebcdic_string); $ebcdic_string = ascci2ebcdic($ascii_string);...
5.12 KB  
Libraries  -  Convert::Translit 1.03
Convert::Translit, transliterate, build_substitutes is a Perl module for string conversion among numerous character sets. SYNOPSIS use Convert::Translit; $translator = new Convert::Translit($result_chset); $translator = new...
79.87 KB  
Libraries  -  OODoc::Format::Pod 0.98
OODoc::Format::Pod is a Perl module to produce POD pages from the doc tree. INHERITANCE OODoc::Format::Pod is an OODoc::Format is an OODoc::Object OODoc::Format::Pod is extended by OODoc::Format::Pod2 SYNOPSIS my $doc =...
102.4 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB