Roles/StoredProcedures.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 86.3% 19 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
initialize
1.0
CRAP 1.0
« Roles/Transaction.pm ↑ Summary
1 # $Id: StoredProcedures.pm,v 1.1.1.1 2005/11/20 18:01:06 dk Exp $
2  
3 package DBIx::Roles::StoredProcedures;
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 $VERSION = '1.00';
9  
10 sub initialize
11 3 ▶{
Subroutine initialize: called CC=1 SCAR=0.0
Pod undocumented
12 3 return undef, undef, qw(call_function);
13 }
14  
15 sub call_function
16 2 ▶{
Subroutine call_function: called CC=1 SCAR=0.0
Pod undocumented
17 2 my ( $self, $storage, $function, @params) = @_;
18
19 return $self-> selectrow_array(
20 "SELECT $function (".
21 2 join(',', map { '?' } @params) .
22 ")",
23 {},
24 @params
25 );
26 }
27  
28 # XXX any() is greedy here, but checking whether there is a corresponding stored procedure
29 # takes intimate knowledge about the particular DBD driver, so we leave that for now
30 sub any
31 2 ▶{
Subroutine any: called CC=1 SCAR=0.0
Pod undocumented
32 2 my ( $self, $storage, $method, @params) = @_;
33  
34 2 return call_function( $self, $storage, $method, @params);
35 }
36  
37 1 1;
38  
39 __DATA__
« Roles/Transaction.pm ↑ Summary