« auto/Tapper/Schema/Tapper-Schema-TestrunDB-4.001040-2-MySQL.pl
↑ Summary
Tapper/Schema/TestrunDB/Result/NotificationEvent.pm »
| 1 | package Tapper::Schema::TestrunDB::Result::Scenario; | ||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |
| 3 | 10 | $Tapper::Schema::TestrunDB::Result::Scenario::VERSION = '5.0.12'; | |
| 4 | # ABSTRACT: Tapper - Grouping of interdependent tests | ||
| 5 | |||
| 6 | 10 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 parent 'DBIx::Class'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 10 | __PACKAGE__->load_components("InflateColumn::Object::Enum", "Core"); | |
| 13 | 10 | __PACKAGE__->table("scenario"); | |
| 14 | 10 | __PACKAGE__->add_columns | |
| 15 | ( | ||
| 16 | "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, }, | ||
| 17 | "type", { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 255, }, | ||
| 18 | "options", { data_type => "TEXT", default => undef, is_nullable => 1, }, | ||
| 19 | "name", { data_type => "VARCHAR", is_nullable => 1, size => 255, }, | ||
| 20 | ); | ||
| 21 | |||
| 22 | 10 | __PACKAGE__->set_primary_key(qw/id/); | |
| 23 | |||
| 24 | __PACKAGE__->inflate_column( | ||
| 25 | options => { | ||
| 26 | 0 | ▶ | inflate => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 27 | 0 | require YAML::XS; | |
| 28 | 0 | YAML::XS::Load(shift); | |
| 29 | }, | ||
| 30 | 0 | ▶ | deflate => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 31 | 0 | require YAML::XS; | |
| 32 | 0 | YAML::XS::Dump(shift); | |
| 33 | }, | ||
| 34 | } | ||
| 35 | 10 | ); | |
| 36 | |||
| 37 | |||
| 38 | 10 | (my $basepkg = __PACKAGE__) =~ s/::\w+$//; | |
| 39 | |||
| 40 | 10 | __PACKAGE__->has_many ( scenario_elements => "${basepkg}::ScenarioElement", { 'foreign.scenario_id' => 'self.id' }); | |
| 41 | |||
| 42 | |||
| 43 | 10 | 1; | |
| 44 | |||
| 45 | __END__ | ||