| 1 | package Concierge::Desk::Component v0.13.0; | ||||||||||
| 2 | 9 | ▶ | use v5.36; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 9 | our $VERSION = 'v0.13.0'; | |||||||||
| 5 | |||||||||||
| 6 | # ABSTRACT: Contract documentation for additional Concierge desk components | ||||||||||
| 7 | |||||||||||
| 8 | # probe_component($class, $payload) -- the one functional sub this module | ||||||||||
| 9 | # contains (see POD, "This module is B<pure documentation>" below for the | ||||||||||
| 10 | # single exception this carves out). Shared by Concierge::Desk::Setup's | ||||||||||
| 11 | # build_desk() (tier 1b) and Concierge's open_desk() (tier 2) for 'defer' | ||||||||||
| 12 | # components, so the two call sites can never drift out of sync. Plain | ||||||||||
| 13 | # package-qualified function, not a method -- Component.pm is never | ||||||||||
| 14 | # instantiated and nothing inherits from it. | ||||||||||
| 15 | 17 | ▶ | sub probe_component ($class, $payload) { | ||||||||
|
Subroutine
probe_component: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 16 | 17 | ▶ | return $class->probe($payload) if $class->can('probe'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 6 | my $ok = eval { | |||||||||
| 18 | 6 | (my $file = $class) =~ s{::}{/}g; | |||||||||
| 19 | 6 | require "$file.pm"; | |||||||||
| 20 | 5 | 1; | |||||||||
| 21 | }; | ||||||||||
| 22 | 6 | ▶ | return $ok ? { success => 1 } : { success => 0, message => $@ }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 9 | 1; | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||