File: sybase.t.removed

package info (click to toggle)
libdbix-xmlmessage-perl 0.05-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: perl: 1,146; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 1,239 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
#   DBIx::XMLMessage Sybase test
# ------------------------------------------------------------------------

#   # Uncomment this if you'd like to test it against a real source

#   print "1..1\n";
#
#   use strict;
#   use DBI;
#   use DBIx::XMLMessage;
#
#   sub t1 { die @_; }
#   # sub t2 { print STDERR @_; }
#   sub t2 { }
#
#   # Template string
#   my $tpl_str =<< "_EOT_";
#   <?xml version="1.0" encoding="UTF-8" ?>
#   <TEMPLATE NAME='SysLogins' TYPE='XML' VERSION='1.0' TABLE='master..syslogins'>
#     <KEY NAME='name' />
#     <KEY NAME='status'  DATATYPE='NUMERIC' />
#     <COLUMN NAME='name' />
#     <COLUMN NAME='suId' EXPR='suid' DATATYPE='NUMERIC' />
#   </TEMPLATE>
#   _EOT_
#
#   my $msg = new DBIx::XMLMessage ('TemplateString' => $tpl_str,
#           '_OnError' => \&t1, '_OnTrace' => \&t2 , '_OnDebug' => \&t2 );
#   # $DBIx::XMLMessage::TRACELEVEL = 1;
#   my $ghash = { 'name' => [ 'sa' ], 'status' => [ 1 ] };
#   my $dbh = DBI->connect('dbi:Sybase:server=__PUT_YOUR_OWN_DATASERVER_NAME_HERE__','sa','')
#           || die $DBI::errstr;
#   $msg->rexec ($dbh, $ghash);
#   my $out = $msg->output_xml(0,0);
#   if ( $out =~ /\<name\>sa/ ) {
#       print "ok\n";
#   } else {
#       print "not ok\n";
#   }