| 1 | package FacialHarmonyAI::SiteKit; | ||||||||||||||||||||||||||||
| 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 | 1 | ▶ | use URI::Escape qw(uri_escape); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Exporter qw(import); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | our $VERSION = '0.1.0'; | |||||||||||||||||||||||||||
| 9 | 1 | our @EXPORT_OK = qw( | |||||||||||||||||||||||||||
| 10 | BASE | ||||||||||||||||||||||||||||
| 11 | analysis_url | ||||||||||||||||||||||||||||
| 12 | pricing_url | ||||||||||||||||||||||||||||
| 13 | features_url | ||||||||||||||||||||||||||||
| 14 | faq_url | ||||||||||||||||||||||||||||
| 15 | report_url | ||||||||||||||||||||||||||||
| 16 | dashboard_url | ||||||||||||||||||||||||||||
| 17 | blog_url | ||||||||||||||||||||||||||||
| 18 | is_valid_report_id | ||||||||||||||||||||||||||||
| 19 | site_metadata | ||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use constant BASE => 'https://facialharmonyai.com'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 3 | ▶ | sub analysis_url { return BASE . '/analyze' } | ||||||||||||||||||||||||||
|
Subroutine
analysis_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 25 | 2 | ▶ | sub pricing_url { return BASE . '/#pricing' } | ||||||||||||||||||||||||||
|
Subroutine
pricing_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 26 | 2 | ▶ | sub features_url { return BASE . '/#features' } | ||||||||||||||||||||||||||
|
Subroutine
features_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 27 | 2 | ▶ | sub faq_url { return BASE . '/#faq' } | ||||||||||||||||||||||||||
|
Subroutine
faq_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 28 | 2 | ▶ | sub dashboard_url { return BASE . '/dashboard' } | ||||||||||||||||||||||||||
|
Subroutine
dashboard_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | 2 | ▶ | sub blog_url { return BASE . '/blog' } | ||||||||||||||||||||||||||
|
Subroutine
blog_url: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 2 | ▶ | sub report_url { | ||||||||||||||||||||||||||
|
Subroutine
report_url: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 32 | 2 | my ($report_id) = @_; | |||||||||||||||||||||||||||
| 33 | 2 | ▶ | die 'report_id must be a non-empty string' unless defined $report_id && length $report_id; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $report_id and length $report_id
MC/DC50%1/2
defined $report_id and length $report_id
defined $report_id
length $report_id
Truth table66%2/3
A and B
A= defined $report_idB= length $report_id
| |||||||||||||||||||||||||||||
| 34 | 1 | return BASE . '/report/' . uri_escape($report_id); | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 3 | ▶ | sub is_valid_report_id { | ||||||||||||||||||||||||||
|
Subroutine
is_valid_report_id: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 38 | 3 | my ($report_id) = @_; | |||||||||||||||||||||||||||
| 39 | 3 | ▶ | return defined $report_id && $report_id =~ /\A[A-Za-z0-9]{4,64}\z/ ? 1 : 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $report_id and $report_id =~ /\A[A-Za-z0-9]{4,64}\z/
MC/DC50%1/2
defined $report_id and $report_id =~ /\A[A-Za-z0-9]{4,64}\z/
defined $report_id
$report_id =~ /\A[A-Za-z0-9]{4,64}\z/
Truth table66%2/3
A and B
A= defined $report_idB= $report_id =~ /\A[A-Za-z0-9]{4,64}\z/
| |||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 1 | ▶ | sub site_metadata { | ||||||||||||||||||||||||||
|
Subroutine
site_metadata: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | return { | ||||||||||||||||||||||||||||
| 44 | 1 | name => 'FacialHarmonyAI', | |||||||||||||||||||||||||||
| 45 | homepage => BASE, | ||||||||||||||||||||||||||||
| 46 | description => 'AI-powered facial analysis and coaching platform', | ||||||||||||||||||||||||||||
| 47 | canonical_pages => { | ||||||||||||||||||||||||||||
| 48 | analysis => analysis_url(), | ||||||||||||||||||||||||||||
| 49 | pricing => pricing_url(), | ||||||||||||||||||||||||||||
| 50 | features => features_url(), | ||||||||||||||||||||||||||||
| 51 | faq => faq_url(), | ||||||||||||||||||||||||||||
| 52 | dashboard => dashboard_url(), | ||||||||||||||||||||||||||||
| 53 | blog => blog_url(), | ||||||||||||||||||||||||||||
| 54 | }, | ||||||||||||||||||||||||||||
| 55 | tags => [qw(facial-analysis ai-coaching facial-harmony url-helpers)], | ||||||||||||||||||||||||||||
| 56 | }; | ||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 1 | 1; | |||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | __END__ | ||||||||||||||||||||||||||||