File Coverage

blib/lib/DBD/Simulated/st.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 4 0.0
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 26 46.1


line stmt bran cond sub pod time code
1             package DBD::Simulated::st;
2              
3             =pod
4              
5             =head1 NAME
6              
7             DBD::Simulated::st - Statement part for DBD::Simulated
8              
9             =head1 SYNOPSIS
10              
11             Do not use this directly without DBI. See L for more information about using a DBD module.
12              
13             =head1 DESCRIPTION
14              
15             see L.
16              
17             =cut
18              
19 1     1   21 use 5.010;
  1         4  
  1         144  
20 1     1   8 use strict;
  1         2  
  1         32  
21 1     1   5 use warnings;
  1         2  
  1         1119  
22              
23             our $VERSION = '0.01';
24              
25             $DBD::Simulated::st::imp_data_size = 0;
26              
27             sub execute {
28 0     0 0   my ($sth, @bind_values) = @_;
29              
30 0 0         return $sth->set_err($1, "Simulated execute error $1")
31             if $sth->{statement} =~ /simulated_execute_error=(\d+)/;
32              
33 0           return 1 || '0E0';
34             }
35              
36             sub fetchrow_arrayref {
37 0     0 0   my ($sth) = @_;
38              
39 0 0         return $sth->set_err($1, "Simulated fetch error $1")
40             if $sth->{statement} =~ /simulated_fetch_error=(\d+)/;
41              
42 0           return;
43             }
44             *fetch = \&fetchrow_arrayref;
45             1;
46              
47             =pod
48              
49             =head1 SUPPORT
50              
51             No support is available
52              
53             =head1 AUTHOR
54              
55             Copyright 2012 Sebastian Willing, eGENTIC Systems L
56              
57             =cut