Xymon::DB::Schema - Group of Schemas for Xymon
use Xymon::DB::Schema;
Load DBIx::Class table classes for Xymon Database application.
use Xymon::DB::Schema; my $db = Xymon::DB::Schema->connect( "DBI:Sybase:server=testsql2005;database=Hobbit", "hobbit", "hobpass", {PrintError => 0} ); if($db) { my $hosts = $db->resultset('host')->search( { hobbit => 1, recordstatus => 'Complete', }, { 'join' => 'LuLocation', '+select' => 'LuLocation.region', '+as' => 'region', order_by => 'hostname ASC' }, )->hashref_pk; } else { die "Unable for connect to server $DBI::errstr"; } print $hosts->{$hostname}->{location} . "\n";
See DBIx::Class for more details on queries.
David Peters CPAN ID: DAVIDP davidp@electronf.com http://www.electronf.com
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
DBIx::Class, perl(1).
To install Xymon::DB::Schema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Xymon::DB::Schema
CPAN shell
perl -MCPAN -e shell install Xymon::DB::Schema
For more information on module installation, please visit the detailed CPAN module installation guide.