| Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/DBIx/Class/PK/Auto.pm |
| Statements | Executed 10 statements in 67µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 14µs | 83µs | DBIx::Class::PK::Auto::BEGIN@4 |
| 1 | 1 | 1 | 10µs | 14µs | DBIx::Class::PK::Auto::BEGIN@5 |
| 1 | 1 | 1 | 9µs | 27µs | DBIx::Class::PK::Auto::BEGIN@6 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package DBIx::Class::PK::Auto; | ||||
| 2 | |||||
| 3 | #use base qw/DBIx::Class::PK/; | ||||
| 4 | 3 | 20µs | 2 | 152µs | # spent 83µs (14+69) within DBIx::Class::PK::Auto::BEGIN@4 which was called:
# once (14µs+69µs) by Class::C3::Componentised::ensure_class_loaded at line 4 # spent 83µs making 1 call to DBIx::Class::PK::Auto::BEGIN@4
# spent 68µs making 1 call to base::import |
| 5 | 3 | 19µs | 2 | 19µs | # spent 14µs (10+5) within DBIx::Class::PK::Auto::BEGIN@5 which was called:
# once (10µs+5µs) by Class::C3::Componentised::ensure_class_loaded at line 5 # spent 14µs making 1 call to DBIx::Class::PK::Auto::BEGIN@5
# spent 5µs making 1 call to strict::import |
| 6 | 3 | 25µs | 2 | 45µs | # spent 27µs (9+18) within DBIx::Class::PK::Auto::BEGIN@6 which was called:
# once (9µs+18µs) by Class::C3::Componentised::ensure_class_loaded at line 6 # spent 27µs making 1 call to DBIx::Class::PK::Auto::BEGIN@6
# spent 18µs making 1 call to warnings::import |
| 7 | |||||
| 8 | 1 | 2µs | 1; | ||
| 9 | |||||
| 10 | =head1 NAME | ||||
| 11 | |||||
| 12 | DBIx::Class::PK::Auto - Automatic primary key class | ||||
| 13 | |||||
| 14 | =head1 SYNOPSIS | ||||
| 15 | |||||
| 16 | use base 'DBIx::Class::Core'; | ||||
| 17 | __PACKAGE__->set_primary_key('id'); | ||||
| 18 | |||||
| 19 | =head1 DESCRIPTION | ||||
| 20 | |||||
| 21 | This class overrides the insert method to get automatically incremented primary | ||||
| 22 | keys. | ||||
| 23 | |||||
| 24 | PK::Auto is now part of Core. | ||||
| 25 | |||||
| 26 | See L<DBIx::Class::Manual::Component> for details of component interactions. | ||||
| 27 | |||||
| 28 | =head1 LOGIC | ||||
| 29 | |||||
| 30 | C<PK::Auto> does this by letting the database assign the primary key field and | ||||
| 31 | fetching the assigned value afterwards. | ||||
| 32 | |||||
| 33 | =head1 METHODS | ||||
| 34 | |||||
| 35 | =head2 insert | ||||
| 36 | |||||
| 37 | The code that was handled here is now in Row for efficiency. | ||||
| 38 | |||||
| 39 | =head2 sequence | ||||
| 40 | |||||
| 41 | The code that was handled here is now in ResultSource, and is being proxied to | ||||
| 42 | Row as well. | ||||
| 43 | |||||
| 44 | =head1 AUTHORS | ||||
| 45 | |||||
| 46 | Matt S. Trout <mst@shadowcatsystems.co.uk> | ||||
| 47 | |||||
| 48 | =head1 LICENSE | ||||
| 49 | |||||
| 50 | You may distribute this code under the same terms as Perl itself. | ||||
| 51 | |||||
| 52 | =cut |