File Coverage

blib/lib/Rose/DB/Constants.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Rose::DB::Constants;
2              
3 16     16   111 use strict;
  16         34  
  16         1142  
4              
5             require Exporter;
6             our @ISA = qw(Exporter);
7              
8             our @EXPORT_OK = qw(IN_TRANSACTION);
9              
10 16     16   109 use constant IN_TRANSACTION => -1;
  16         34  
  16         1169  
11              
12             1;
13              
14             __END__
15              
16             =head1 NAME
17              
18             Rose::DB::Constants - Symbolic names for important Rose::DB constants.
19              
20             =head1 SYNOPSIS
21              
22             use Rose::DB::Constants qw(IN_TRANSACTION);
23             ...
24              
25             $ret = $db->begin_work or die $db->error;
26             ...
27             unless($ret == IN_TRANSACTION)
28             {
29             $db->commit or die $db->error;
30             }
31              
32             =head1 DESCRIPTION
33              
34             This module contains and optionally exports symbolic names for important L<Rose::DB> constants. The only constant defined so far is C<IN_TRANSACTION>. See the documentation for L<Rose::DB>'s C<begin_work()> object method for more information on this constant.
35              
36             This module inherits from C<Exporter>. No symbols are exported by default.
37              
38             =head1 AUTHOR
39              
40             John C. Siracusa (siracusa@gmail.com)
41              
42             =head1 LICENSE
43              
44             Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is
45             free software; you can redistribute it and/or modify it under the same terms
46             as Perl itself.