BackPAN/Index/Dist.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 50.0% 1 / 2 totaltotal 97.5% 40 / 41 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« BackPAN/Index/Release.pm ↑ Summary BackPAN/Index/Schema.pm »
1 10 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package BackPAN::Index::Dist;
3  
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6  
7 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 10 ▶use base 'DBIx::Class::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 10 __PACKAGE__->table("dists");
12 10 __PACKAGE__->add_columns(
13 "name",
14 { data_type => "text", is_nullable => 0 },
15 "first_release",
16 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
17 "latest_release",
18 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
19 "first_date",
20 { data_type => "integer", is_nullable => 0 },
21 "latest_date",
22 { data_type => "integer", is_nullable => 0 },
23 "first_author",
24 { data_type => "text", is_nullable => 0 },
25 "latest_author",
26 { data_type => "text", is_nullable => 0 },
27 "num_releases",
28 { data_type => "integer", is_nullable => 0 },
29 );
30 10 __PACKAGE__->set_primary_key("name");
31 10 __PACKAGE__->belongs_to(
32 "first_release",
33 "BackPAN::Index::Release",
34 { path => "first_release" },
35 { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
36 );
37 10 __PACKAGE__->belongs_to(
38 "latest_release",
39 "BackPAN::Index::Release",
40 { path => "latest_release" },
41 { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
42 );
43 10 __PACKAGE__->has_many(
44 "releases",
45 "BackPAN::Index::Release",
46 { "foreign.dist" => "self.name" },
47 { cascade_copy => 0, cascade_delete => 0 },
48 );
49  
50  
51 # Created by DBIx::Class::Schema::Loader v0.07033 @ 2012-12-27 01:39:08
52 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BuglboqFzRDZo6vlK4n0yw
53  
54 10 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
55 10 with 'BackPAN::Index::Role::AsHash';
56  
57 use overload
58 7 ▶ q[""] => sub { $_[0]->name },
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
59 10 fallback => 1;
60  
61 1 ▶sub data_methods {
Subroutine data_methods: called CC=1 SCAR=0.0
Pod undocumented
62 1 return qw(
63 name num_releases
64 first_release first_date first_author
65 latest_release latest_date latest_author
66 );
67 }
68  
69 1 ▶sub authors {
Subroutine authors: called CC=1 SCAR=0.0
Pod documented
70 1 my $self = shift;
71  
72 1 return $self->releases->search(undef, { distinct => 1 })->get_column("cpanid")->all;
73 }
74  
75 10 1;
76  
77 __END__
« BackPAN/Index/Release.pm ↑ Summary BackPAN/Index/Schema.pm »