Main > Programming > Libraries >

Parse::Binary::FixedFormat::Variants 0.10

Parse::Binary::FixedFormat::Variants 0.10

Sponsored Links

Parse::Binary::FixedFormat::Variants 0.10 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.031 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1158
Date added: 2006-08-23
Publisher: Autrijus Tang

Parse::Binary::FixedFormat::Variants 0.10 description

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.

Parse::Binary::FixedFormat::Variants 0.10 Screenshot

Advertisements

Parse::Binary::FixedFormat::Variants 0.10 Keywords

Bookmark Parse::Binary::FixedFormat::Variants 0.10

Hyperlink code:
Link for forum:

Parse::Binary::FixedFormat::Variants 0.10 Copyright

WareSeeker periodically updates pricing and software information of Parse::Binary::FixedFormat::Variants 0.10 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Parse::Binary::FixedFormat::Variants 0.10 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Parse::Binary::FixedFormat is a Perl module to convert between fixed-length fields and hashes. Free Download
Parse::Java is a Perl module that acts like a parser for Java code. Free Download
Parse::MediaWikiDump is a Perl module with tools to process MediaWiki dump files. Free Download
DateTime::Format::Epoch::Lilian is a Perl module to convert DateTimes to/from Lilian Days. Free Download
Designer Framework provides a highly customizable e-commerce framework. Free Download
DateTime::Format::Epoch::RataDie is a Perl module that can convert DateTimes to/from Rata Die. Free Download
Data::Stag is a Perl module with structured tags datastructures. Free Download
DateTime::Format::Epoch::TJD is a Perl module that can convert DateTimes to/from Truncated Julian Days. Free Download