| 1 | package Data::Storage::DBI::Result; |
|---|
| 2 | |
|---|
| 3 | # $Id: Result.pm 13653 2007-10-22 09:11:20Z gr $ |
|---|
| 4 | |
|---|
| 5 | use strict; |
|---|
| 6 | use warnings; |
|---|
| 7 | use DBI ':sql_types'; |
|---|
| 8 | use Error::Hierarchy::Util 'assert_defined'; |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | our $VERSION = '0.04'; |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | use base 'Class::Accessor::Complex'; |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | __PACKAGE__ |
|---|
| 18 | ->mk_new |
|---|
| 19 | ->mk_scalar_accessors(qw(sth result)); |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | sub fetch { |
|---|
| 23 | my $self = shift; |
|---|
| 24 | |
|---|
| 25 | assert_defined $self->sth, 'called without set statement handle.'; |
|---|
| 26 | |
|---|
| 27 | $self->sth->fetch; |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | sub finish { |
|---|
| 32 | my $self = shift; |
|---|
| 33 | |
|---|
| 34 | assert_defined $self->sth, 'called without set statement handle.'; |
|---|
| 35 | |
|---|
| 36 | $self->sth->finish; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | sub rows { |
|---|
| 41 | my $self = shift; |
|---|
| 42 | |
|---|
| 43 | assert_defined $self->sth, 'called without set statement handle.'; |
|---|
| 44 | |
|---|
| 45 | $self->sth->rows; |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | 1; |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | __END__ |
|---|
| 53 | |
|---|
| 54 | =head1 NAME |
|---|
| 55 | |
|---|
| 56 | Data::Storage - generic abstract storage mechanism |
|---|
| 57 | |
|---|
| 58 | =head1 SYNOPSIS |
|---|
| 59 | |
|---|
| 60 | None yet (see below). |
|---|
| 61 | |
|---|
| 62 | =head1 DESCRIPTION |
|---|
| 63 | |
|---|
| 64 | None yet. This is an early release; fully functional, but undocumented. The |
|---|
| 65 | next release will have more documentation. |
|---|
| 66 | |
|---|
| 67 | =head1 TAGS |
|---|
| 68 | |
|---|
| 69 | If you talk about this module in blogs, on del.icio.us or anywhere else, |
|---|
| 70 | please use the C<datastorage> tag. |
|---|
| 71 | |
|---|
| 72 | =head1 BUGS AND LIMITATIONS |
|---|
| 73 | |
|---|
| 74 | No bugs have been reported. |
|---|
| 75 | |
|---|
| 76 | Please report any bugs or feature requests to |
|---|
| 77 | C<bug-data-storage@rt.cpan.org>, or through the web interface at |
|---|
| 78 | L<http://rt.cpan.org>. |
|---|
| 79 | |
|---|
| 80 | =head1 INSTALLATION |
|---|
| 81 | |
|---|
| 82 | See perlmodinstall for information and options on installing Perl modules. |
|---|
| 83 | |
|---|
| 84 | =head1 AVAILABILITY |
|---|
| 85 | |
|---|
| 86 | The latest version of this module is available from the Comprehensive Perl |
|---|
| 87 | Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN |
|---|
| 88 | site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>. |
|---|
| 89 | |
|---|
| 90 | =head1 AUTHORS |
|---|
| 91 | |
|---|
| 92 | Marcel GrE<uuml>nauer, C<< <marcel@cpan.org> >> |
|---|
| 93 | |
|---|
| 94 | =head1 COPYRIGHT AND LICENSE |
|---|
| 95 | |
|---|
| 96 | Copyright 2007 by Marcel GrE<uuml>nauer |
|---|
| 97 | |
|---|
| 98 | This library is free software; you can redistribute it and/or modify |
|---|
| 99 | it under the same terms as Perl itself. |
|---|
| 100 | |
|---|
| 101 | =cut |
|---|
| 102 | |
|---|