CALbits
Home Up CALbits Tricks Testing Stuff

 

Local::CALbits

A module to assist the importing and exporting of CAL3D data files as used by the IMVU chat system.

Expect this module to change as further information becomes available. Also expect it to be renamed once its specification stabilises.

Important note: The module will be moved out of the "Local" namespace when its specification stabilises. 

Implemented:

Version 0.02

Identical to 0.01 but gains a description in comments at the head of the file

Version 0.01

Uses the XML::Structured importer
Importing and parsing file into a data structure
Importing and parsing string into data structure
Exporting data structure as a string

Not implemented:

Using XML::SAX directly
Using XML::Parser directly
Parsing numeric content
Parsing translations and rotations: It is assumed that a future version would convert "0 0 0 1" into an array reference: [0,0,0,1] and convert the corresponding array ref back to a string.
Morph extensions to the XMF file format (no data is available)
quaternion rotation library functions

Requires:

XML::Structured

XML::Structured requires either XML::Parser or XML::SAX

You'll probably also need XML::NamespaceSupport too though I've not checked this as I let the CPAN shell install dependancies automatically.

XML::Structured version 1.0 requires a small patch in order to run correctly without the XML::Parser module. 

  1. Find the XML folder
  2. Open Structured.pm in a text editor
  3. Look at the first few lines:
    package XML::Structured;

    use vars qw($VERSION @ISA @EXPORT);

    require Exporter;

    @ISA = qw(Exporter);
    @EXPORT = qw(XMLin XMLinfile XMLout);
    $VERSION = '1.0';

    # use XML::Parser;

  4. The line "require Exporter;" is missing and should be added.
  5. The line "use XML::Parser;" should be commented out or removed.

Download
 

 

Home Up CALbits Tricks Testing Stuff