Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use DBIx::JSON;
- my $dbuser = "viewVC";
- my $dbpass = "some_pass";
- my $host = "localhost";
- my $dbname = "ViewVC";
- my $port = "3306";
- my $dsn = "dbname=$dbname;$host=host;port=$port";
- my $obj = DBIx::JSON->new($dsn, "mysql", $dbuser, $dbpass);
- $obj->do_select("select * from checkins limit 10;");
- $obj->err && die $obj->errstr;
- print "Content-Type: application/json";
- print $obj->get_json;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement