| 1 | #!/usr/bin/perl | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use WWW::Shopify; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | package WWW::Shopify::Model::LinkList::Link; | ||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use parent "WWW::Shopify::Model::NestedItem"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 29 | ▶ | my $fields; sub fields { return $fields; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fields: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | BEGIN { $fields = { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | "id" => new WWW::Shopify::Field::Identifier(), | ||||||||||||||||||||||||||||||||||||||||||
| 14 | "position" => new WWW::Shopify::Field::Int(), | ||||||||||||||||||||||||||||||||||||||||||
| 15 | "subject" => new WWW::Shopify::Field::String(), | ||||||||||||||||||||||||||||||||||||||||||
| 16 | "subject_id" => new WWW::Shopify::Field::Int(), | ||||||||||||||||||||||||||||||||||||||||||
| 17 | "subject_params" => new WWW::Shopify::Field::String(), | ||||||||||||||||||||||||||||||||||||||||||
| 18 | "title" => new WWW::Shopify::Field::String(), | ||||||||||||||||||||||||||||||||||||||||||
| 19 | "link_list_id" => new WWW::Shopify::Field::Relation::Parent('WWW::Shopify::Model::LinkList'), | ||||||||||||||||||||||||||||||||||||||||||
| 20 | "link_type" => new WWW::Shopify::Field::String::Enum(["collection", "product", "frontpage", "catalog", "page", "blog", "search", "http"]) | ||||||||||||||||||||||||||||||||||||||||||
| 21 | }; } | ||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | sub creation_minimal { return qw(title link_type); } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
creation_minimal: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | sub creation_filled { return qw(link_list_id); } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
creation_filled: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | sub update_filled { return qw(); } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update_filled: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | sub link_model_type { | ||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | return ('WWW::Shopify::Model::CustomCollection', 'WWW::Shopify::Model::SmartCollection') if $_[0]->link_type eq 'collection'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
link_model_type: not called CC=6 SCAR=37.4
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | return 'WWW::Shopify::Model::Product' if $_[0]->link_type eq 'product'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | return 'WWW::Shopify::Model::Page' if $_[0]->link_type eq 'page'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | return 'WWW::Shopify::Model::Blog' if $_[0]->link_type eq 'blog'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | return () if wantarray; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | sub link_url { | ||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | return '/search' if $_[0]->link_type eq "search"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
link_url: not called CC=9 SCAR=45.0
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | return '/' if $_[0]->link_type eq "frontpage"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | ▶ | return '/collections/all' if $_[0]->link_type eq "catalog"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | return $_[0]->subject if $_[0]->link_type eq "http"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | return '/collections/' . $_[0]->subject if $_[0]->link_type eq 'collection'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | return '/products/' . $_[0]->subject if $_[0]->link_type eq 'product'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | return '/pages/' . $_[0]->subject if $_[0]->link_type eq 'page'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | return '/blogs/' . $_[0]->subject if $_[0]->link_type eq 'blogs'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | ▶ | sub needs_login { return 1; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
needs_login: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | ▶ | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
id: not called CC=2 SCAR=16.3
Subroutine
link_list_id: not called CC=2 SCAR=16.3
Subroutine
link_type: not called CC=2 SCAR=16.3
Subroutine
position: not called CC=2 SCAR=16.3
Subroutine
subject: not called CC=2 SCAR=16.3
Subroutine
subject_id: not called CC=2 SCAR=16.3
Subroutine
subject_params: not called CC=2 SCAR=16.3
Subroutine
title: not called CC=2 SCAR=16.3
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Branch: 9 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||