Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    AnyData 0.10

    Download button

    No screenshots available
    Downloads: 434  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Very Good (4.0/5)
    1 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jeff Zucker | More programs
    Perl Artistic License / FREE
    May 10th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    AnyData description

    AnyData is a Perl module that allows easy access to data in many formats.

    AnyData is a Perl module that allows easy access to data in many formats.

    SYNOPSIS

    $table = adTie( 'CSV','my_db.csv','o', # create a table
    {col_names=>'name,country,sex'}
    );
    $table->{Sue} = {country=>'de',sex=>'f'}; # insert a row
    delete $table->{Tom}; # delete a single row
    $str = $table->{Sue}->{country}; # select a single value
    while ( my $row = each %$table ) { # loop through table
    print $row->{name} if $row->{sex} eq 'f';
    }
    $rows = $table->{{age=>'> 25'}} # select multiple rows
    delete $table->{{country=>qr/us|mx|ca/}}; # delete multiple rows
    $table->{{country=>'Nz'}}={country=>'nz'}; # update multiple rows
    my $num = adRows( $table, age=>'< 25' ); # count matching rows
    my @names = adNames( $table ); # get column names
    my @cars = adColumn( $table, 'cars' ); # group a column
    my @formats = adFormats(); # list available parsers
    adExport( $table, $format, $file, $flags ); # save in specified format
    print adExport( $table, $format, $flags ); # print to screen in format
    print adDump($table); # dump table to screen
    undef $table; # close the table

    adConvert( $format1, $file1, $format2, $file2 ); # convert btwn formats
    print adConvert( $format1, $file1, $format2 ); # convert to screen

    The rather wacky idea behind this module and its sister module DBD::AnyData is that any data, regardless of source or format should be accessable and modifiable with the same simple set of methods. This module provides a multi-dimensional tied hash interface to data in a dozen different formats. The DBD::AnyData module adds a DBI/SQL interface for those same formats.
    Both modules provide built-in protections including appropriate flocking() for all I/O and (in most cases) record-at-a-time access to files rather than slurping of entire files.

    Currently supported formats include general format flatfiles (CSV, Fixed Length, etc.), specific formats (passwd files, httpd logs, etc.), and a variety of other kinds of formats (XML, Mp3, HTML tables). The number of supported formats will continue to grow rapidly since there is an open API making it easy for any author to create additional format parsers which can be plugged in to AnyData itself and thereby be accessible by either the tiedhash or DBI/SQL interface.

    The AnyData.pm module itself is pure Perl and does not depend on anything other than modules that come standard with Perl. Some formats and some advanced features require additional modules: to use the remote ftp/http features, you must have the LWP bundle installed; to use the XML format, you must have XML::Parser and XML::Twig installed; to use the HTMLtable format for reading, you must have HTML::Parser and HTML::TableExtract installed but you can use the HTMLtable for writing with just the standard CGI module. To use DBI/SQL commands, you must have DBI, DBD::AnyData, SQL::Statement and DBD::File installed.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    data access | Perl extension | Perl module | AnyData | data | access

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM