Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 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 > Perl Modules

    Class::DBI::Factory 0.994

    Download button

    No screenshots available
    Downloads: 317  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.5/5)
    2 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    William Ross | More programs
    Perl Artistic License / FREE
    December 14th, 2007, 20:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Class::DBI::Factory description

    Class::DBI::Factory is a factory interface to a set of Class::DBI classes, with optional mod_perl application skeleton.

    Class::DBI::Factory is a factory interface to a set of Class::DBI classes, with optional mod_perl application skeleton.

    SYNOPSIS

    # in a simple script:

    my $factory = Class::DBI::Factory->new;
    $factory->set_db({
    db_type => 'mysql',
    db_name => 'items',
    db_username => 'me',
    db_password => 'password',
    });

    $factory->use_classes(qw(My::Item));

    my @columns = $factory->columns('item');
    my $item = $factory->retrieve('item', 1);
    my $iterator = $factory->search('item', year => 1980);


    # in an apache host configuration:

    PerlSetEnv _CDF_SITE_CONFIG '/home/my_site/conf/cdf.conf'
    < Location "/directory" >
    SetHandler perl-script
    PerlHandler Class::DBI::Factory::Handler
    < /Location >

    # and on a template somewhere:

    < p >
    [% FOREACH album IN factory.search('album',
    'year', input.year,
    'artist', artist,
    ) %][% album.title %]< br >[% END %]
    < /p >

    INTRODUCTION

    If you use Class::DBI::Factory by itself, it's a quick, clean way to work with a set of Class::DBI data classes, providing a simple way to access their data and class methods and removing some of cdbi's limitations: with the factory it's very easy to use the same data classes for different databases at the same time.

    If you use Class::DBI::Factory with the set of helper classes that come with it, it's a full framework for MVC-friendly mod_perl-based web applications. The supplied Handler base class makes the factory's simple, consistent interface available on TT2 (or other) templates and hides all the complexity of working under mod_perl. In this context the database-abstraction that the factory offers allows you to use the same application on several sites on the same server, which is where all this began many years ago.

    CDF is a simple alternative to application frameworks like Maypole and Catalyst. It doesn't automate the creation of CDBI classes - I prefer to write them - but it handles pretty much everything else and is very easy to extend and override.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    factory interface | Class::DBI class | Perl module | Class::DBI | factory | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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