← Index
Performance Profile   « block view • line view • sub view »
For /wise/base/deliv/dev/bin/getfix
  Run on Thu May 20 15:30:03 2010
Reported on Thu May 20 16:25:31 2010

File/wise/base/static/lib/perl5/site_perl/5.10.0/DBIx/Class/ResultSourceProxy/Table.pm
Statements Executed50
Total Time0.002398 seconds

Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
5550.000410.00326DBIx::Class::ResultSourceProxy::Table::table
00000DBIx::Class::ResultSourceProxy::Table::BEGIN

LineStmts.Exclusive
Time
Avg.Code
1package DBIx::Class::ResultSourceProxy::Table;
2
334.2e-51.4e-5use strict;
# spent 11µs making 1 call to strict::import
433.6e-51.2e-5use warnings;
# spent 29µs making 1 call to warnings::import
5
632.9e-59.7e-6use base qw/DBIx::Class::ResultSourceProxy/;
# spent 2.18ms making 1 call to base::import
7
830.001440.00048use DBIx::Class::ResultSource::Table;
# spent 3µs making 1 call to import
9
1011.4e-51.4e-5__PACKAGE__->mk_classdata(table_class => 'DBIx::Class::ResultSource::Table');
# spent 196µs making 1 call to DBIx::Class::mk_classdata
11
1217.0e-67.0e-6__PACKAGE__->mk_classdata('table_alias'); # FIXME: Doesn't actually do
# spent 138µs making 1 call to DBIx::Class::mk_classdata
13 # anything yet!
14
15=head1 NAME
16
17DBIx::Class::ResultSourceProxy::Table - provides a classdata table
18object and method proxies
19
20=head1 SYNOPSIS
21
22 __PACKAGE__->table('cd');
23 __PACKAGE__->add_columns(qw/cdid artist title year/);
24 __PACKAGE__->set_primary_key('cdid');
25
26=head1 METHODS
27
28=head2 add_columns
29
30 __PACKAGE__->add_columns(qw/cdid artist title year/);
31
32Adds columns to the current class and creates accessors for them.
33
34=cut
35
36=head2 table
37
38 __PACKAGE__->table('tbl_name');
39
40Gets or sets the table name.
41
42=cut
43
44
# spent 3.26ms (415µs+2.85) within DBIx::Class::ResultSourceProxy::Table::table which was called 5 times, avg 652µs/call: # once (88µs+619µs) at line 10 of /wise/base/deliv/dev/lib/perl/WISE/DB/FrameIndex/Scan.pm # once (87µs+589µs) at line 11 of /wise/base/deliv/dev/lib/perl/WISE/DB/FrameIndex/HouseKeeping.pm # once (80µs+584µs) at line 10 of /wise/base/deliv/dev/lib/perl/WISE/DB/FrameIndex/Frame.pm # once (78µs+532µs) at line 10 of /wise/base/deliv/dev/lib/perl/WISE/DB/FrameIndex/MissionPlan.pm # once (82µs+522µs) at line 11 of /wise/base/deliv/dev/lib/perl/WISE/DB/FrameIndex/Tile.pm
sub table {
45350.000832.4e-5 my ($class, $table) = @_;
46 return $class->result_source_instance->name unless $table;
47 unless (ref $table) {
# spent 769µs making 5 calls to Class::Accessor::Grouped::__ANON__[(eval 0)[/wise/base/static/lib/perl5/site_perl/5.10.0/Class/Accessor/Grouped.pm:156]:8], avg 154µs/call # spent 162µs making 5 calls to DBIx::Class::ResultSource::new, avg 32µs/call # spent 127µs making 5 calls to UNIVERSAL::can, avg 25µs/call
48 $table = $class->table_class->new({
49 $class->can('result_source_instance') ?
50 %{$class->result_source_instance} : (),
51 name => $table,
52 result_class => $class,
53 source_name => undef,
54 });
55 }
56
57 $class->mk_classdata('result_source_instance')
# spent 1.19ms making 5 calls to DBIx::Class::mk_classdata, avg 239µs/call # spent 34µs making 5 calls to UNIVERSAL::can, avg 7µs/call
58 unless $class->can('result_source_instance');
59
60 $class->result_source_instance($table);
61
62 if ($class->can('schema_instance')) {
# spent 123µs making 5 calls to UNIVERSAL::can, avg 25µs/call
63 $class =~ m/([^:]+)$/;
64 $class->schema_instance->register_class($class, $class);
65 }
66 return $class->result_source_instance->name;
67}
68
69=head2 has_column
70
71 if ($obj->has_column($col)) { ... }
72
73Returns 1 if the class has a column of this name, 0 otherwise.
74
75=cut
76
77=head2 column_info
78
79 my $info = $obj->column_info($col);
80
81Returns the column metadata hashref for a column. For a description of
82the various types of column data in this hashref, see
83L<DBIx::Class::ResultSource/add_column>
84
85=cut
86
87=head2 columns
88
89 my @column_names = $obj->columns;
90
91=cut
92
9314.0e-64.0e-61;
94
95=head1 AUTHORS
96
97Matt S. Trout <mst@shadowcatsystems.co.uk>
98
99=head1 LICENSE
100
101You may distribute this code under the same terms as Perl itself.
102
103=cut
104