line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MojoMojo::Schema::Result::Tag; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
32309
|
use strict; |
|
40
|
|
|
|
|
101
|
|
|
40
|
|
|
|
|
1215
|
|
4
|
40
|
|
|
40
|
|
223
|
use warnings; |
|
40
|
|
|
|
|
89
|
|
|
40
|
|
|
|
|
1065
|
|
5
|
|
|
|
|
|
|
|
6
|
40
|
|
|
40
|
|
205
|
use parent qw/MojoMojo::Schema::Base::Result/; |
|
40
|
|
|
|
|
134
|
|
|
40
|
|
|
|
|
242
|
|
7
|
40
|
|
|
40
|
|
2426
|
use Carp qw/croak/; |
|
40
|
|
|
|
|
87
|
|
|
40
|
|
|
|
|
7209
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->load_components( "Core" ); |
10
|
|
|
|
|
|
|
__PACKAGE__->table("tag"); |
11
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
12
|
|
|
|
|
|
|
"id", |
13
|
|
|
|
|
|
|
{ data_type => "INTEGER", is_nullable => 0, size => undef, is_auto_increment => 1 }, |
14
|
|
|
|
|
|
|
"person", |
15
|
|
|
|
|
|
|
{ data_type => "INTEGER", is_nullable => 0, size => undef }, |
16
|
|
|
|
|
|
|
"page", |
17
|
|
|
|
|
|
|
{ data_type => "INTEGER", is_nullable => 1, size => undef }, |
18
|
|
|
|
|
|
|
"photo", |
19
|
|
|
|
|
|
|
{ data_type => "INTEGER", is_nullable => 1, size => undef }, |
20
|
|
|
|
|
|
|
"tag", |
21
|
|
|
|
|
|
|
{ data_type => "VARCHAR", is_nullable => 0, size => 100 }, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key("id"); |
24
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( "person", "MojoMojo::Schema::Result::Person", { id => "person" } ); |
25
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( "page", "MojoMojo::Schema::Result::Page", { id => "page" } ); |
26
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( "photo", "MojoMojo::Schema::Result::Photo", { id => "photo" } ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
MojoMojo::Schema::Result::Tag - store page tags |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 refcount |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Convenience method to return get_column('refcount') if this column |
37
|
|
|
|
|
|
|
is available. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub refcount { |
42
|
30
|
|
|
30
|
1
|
68
|
my $self = shift; |
43
|
30
|
50
|
|
|
|
200
|
return $self->get_column('refcount') if $self->has_column_loaded('refcount'); |
44
|
0
|
|
|
|
|
|
croak 'Tried to call refcount on resultset without column'; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 AUTHOR |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Marcus Ramberg <mramberg@cpan.org> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 LICENSE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This library is free software. You can redistribute it and/or modify |
54
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |