| 1 | package URI::Info::PluginBase; | ||||||||||
| 2 | |||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 6 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 7 | 6 | our $DATE = '2023-06-14'; # DATE | |||||||||
| 8 | 6 | our $DIST = 'URI-Info'; # DIST | |||||||||
| 9 | 6 | our $VERSION = '0.003'; # VERSION | |||||||||
| 10 | |||||||||||
| 11 | sub new { | ||||||||||
| 12 | 0 | ▶ | my ($class, %args) = @_; | ||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | # check allowed arguments | ||||||||||
| 15 | 0 | my $meta = $class->meta; | |||||||||
| 16 | 0 | my $conf = $meta->{conf}; | |||||||||
| 17 | 0 | for my $arg (keys %args) { | |||||||||
| 18 | die "[URI::Info] Unrecognized plugin $class argument '$arg', please use one of ".join("/", sort keys %$conf) | ||||||||||
| 19 | 0 | ▶ | unless exists $conf->{$arg}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | bless \%args, $class; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 6 | 1; | |||||||||
| 26 | # ABSTRACT: Base class for URI::Info::Plugin::* | ||||||||||
| 27 | |||||||||||
| 28 | __END__ | ||||||||||