CatalystX::Usul::File::Storage::XML::Bare - Read/write XML data storage model


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.

Index


Name

Top

CatalystX::Usul::File::Storage::XML::Bare - Read/write XML data storage model

Version

Top

0.3.$Revision: 576 $

Synopsis

Top

   package CatalystX::Usul::File::Storage;

   use parent qw(CatalystX::Usul);

   __PACKAGE__->config( class => q(XML::Bare) );

   sub new {
      my ($self, $app, $attrs) = @_; $attrs ||= {};

      my $class = $attrs->{class} || $self->config->{class};

      if (q(+) eq substr $class, 0, 1) { $class = substr $class, 1 }
      else { $class = __PACKAGE__.q(::).$class }

      $self->ensure_class_loaded( $class );

      return $class->new( $app, $attrs );
   }

Description

Top

Uses XML::Bare to read and write XML files

Subroutines/Methods

Top

_read_file

Defines the closure that reads the file, parses the DTD, parses the file using XML::Bare and filters the resulting hash so that it is compatible with XML::Simple. Calls read file with locking in the base class

_read_filter

Processes the hash read by _read_file altering it's structure so that is is compatible with XML::Simple

_write_file

Defines the closure that writes the DTD and data to file. Filters the data so that it is readable by XML::Bare

_write_filter

Reverses the changes made by _read_filter

Diagnostics

Top

None

Configuration and Environment

Top

None

Dependencies

Top

CatalystX::Usul::File::Storage::XML
XML::Bare

Incompatibilities

Top

There are no known incompatibilities in this module

Bugs and Limitations

Top

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Top

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Top


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.