AnyData

 view release on metacpan or  search on metacpan

lib/AnyData.pm  view on Meta::CPAN


  my $table = adTie(...);
  print adDump($table);

This method prints the raw data in the table.  Column names are printed inside angle brackets and separated by colons on the first line, then each row is printed as a list of values inside square brackets.

=head2 adFormats()

  print "$_\n for adFormats();

This method shows the available format parsers, e.g. 'CSV', 'XML', etc.  It looks in your @INC for the .../AnyData/Format directory and prints the names of format parsing files there.  If the parser requires further modules (e.g. XML requires XML::Pa...

=head1 FURTHER DETAILS

=head2 Column Names

Column names may be assigned in three ways:

 * pre  -- The format parser preassigns column
           names (e.g. Passwd files automatically have
           columns named 'username', 'homedir', 'GID', etc.).

lib/AnyData/Format/XML.pm  view on Meta::CPAN

complete details of usage.

The module is built on top of Michel Rodriguez's excellent XML::Twig which
means that the AnyData interfaces can now include information from DTDs,
be smarter about inferring data structure, reduce memory consumption on
huge files, and provide access to many powerful features of XML::Twig and
XML::Parser on which it is based.

Importing options allow you to import/access/modify XML of almost any length or complexity.  This includes the ability to access different subtrees as separate or joined databases.

Exporting and converting options allow you to take data from almost any source (a perl array, any DBI database, etc.) and output it as an XML file.  You can control the formatting of the resulting XML either by supplying a DTD listing things like nes...

The documentation below outlines the special flags that can be used
in either of the interfaces to fine-tune how the XML is treated.

The flags listed below define the relationship between tags and 
attributes in the XML document and columns in the resulting database.
In many cases, you can simply accept the defaults and the database
will be built automatically.  However, you can also fine tune the
generation of the database by specifying which tags and attributes
you are interested in and their relationship with database columns.

t/weblog.t  view on Meta::CPAN

ok( '252'                         eq $row->{bytes},      'bytes' );
ok(
'"Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"'
      eq $row->{client},
    'client ' . $row->{client}
);
ok( '"http://www.example.com/"' eq $row->{referer},
    'referer: ' . $row->{referer} );

#write test
#TODO: looks like writing a weblog is broken
#print STDERR "\n---\n";
#print STDERR adExport( $table, 'Weblog', undef, {  } );
#print STDERR "\n---\n";
#ok(
#    <<'HERE' eq adExport( $table, 'Weblog', undef, {  } ), 'export weblog format' );
#HERE

__END__



( run in 0.338 second using v1.01-cache-2.11-cpan-64827b87656 )