| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package DBIx::Inspector; | 
| 2 | 1 |  |  | 1 |  | 29578 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 46 |  | 
| 3 | 1 |  |  | 1 |  | 6 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 33 |  | 
| 4 | 1 |  |  | 1 |  | 28 | use 5.008001; | 
|  | 1 |  |  |  |  | 8 |  | 
|  | 1 |  |  |  |  | 55 |  | 
| 5 |  |  |  |  |  |  | our $VERSION = '0.12'; | 
| 6 | 1 |  |  | 1 |  | 910 | use Class::Accessor::Lite; | 
|  | 1 |  |  |  |  | 1101 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 7 |  |  |  |  |  |  | Class::Accessor::Lite->mk_accessors(qw/dbh catalog schema driver/); | 
| 8 | 1 |  |  | 1 |  | 58 | use Carp (); | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 14 |  | 
| 9 | 1 |  |  | 1 |  | 1190 | use DBIx::Inspector::Table; | 
|  | 1 |  |  |  |  | 5 |  | 
|  | 1 |  |  |  |  | 39 |  | 
| 10 | 1 |  |  | 1 |  | 1277 | use DBIx::Inspector::Iterator; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 36 |  | 
| 11 | 1 |  |  | 1 |  | 8 | use DBIx::Inspector::ForeignKey; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 31 |  | 
| 12 | 1 |  |  | 1 |  | 2737 | use Module::Load (); | 
|  | 1 |  |  |  |  | 1166 |  | 
|  | 1 |  |  |  |  | 122 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | sub new { | 
| 15 | 0 |  |  | 0 | 1 |  | my $class = shift; | 
| 16 | 0 | 0 |  |  |  |  | my %args = @_ == 1 ? %{ $_[0] } : @_; | 
|  | 0 |  |  |  |  |  |  | 
| 17 | 0 |  |  |  |  |  | my $dbh = $args{dbh}; | 
| 18 | 0 | 0 |  |  |  |  | Carp::croak("missing mandatory parameter: dbh") unless $dbh; | 
| 19 | 0 |  |  |  |  |  | my $driver_name = $dbh->{Driver}->{Name}; | 
| 20 | 0 |  |  |  |  |  | my $driver_class = "$class\::Driver::$driver_name"; | 
| 21 | 0 |  |  |  |  |  | Module::Load::load($driver_class); | 
| 22 | 0 |  |  |  |  |  | return $driver_class->new(%args); | 
| 23 |  |  |  |  |  |  | } | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | 1; | 
| 26 |  |  |  |  |  |  | __END__ |