Docker/Network.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 93.3% 14 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Docker/Image.pm ↑ Summary Docker/Plugin.pm »
1 package API::Docker::Network;
2 # ABSTRACT: Removed in 0.004 -- replaced by API::Docker::Type::Network
3 our $VERSION = '0.006';
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # A removed class, kept as a stub on purpose (karr k92). A module that
9 # disappears from a distribution does not disappear from the disks it was
10 # installed on: the old file stays behind and keeps loading, so deleting it
11 # here would leave a working API::Docker::Network shadowing this release for
12 # everyone who ever installed the last one. Shipping a file overwrites it;
13 # shipping nothing does not.
14 #
15 # It refuses instead of working, and it refuses at load rather than at the
16 # first method call, because that is the earliest point at which the caller
17 # can be told -- and because @Author::GETTY generates no compile-all author
18 # test that a dying module would fail. Measured on 2026-08-28: the bundle
19 # generates exactly xt/author/pod-syntax.t, which parses POD without loading
20 # anything, and xt/release/changes_has_content.t, which only reads Changes.
21 my $REFUSED =
22 __PACKAGE__ . ' was removed in API::Docker 0.004 and this file is a stub'
23 . ' with nothing in it: it ships only so that installing this'
24 . ' release overwrites the working copy an earlier one left on'
25 . ' disk. You have not hit a fault in the distribution. The'
26 . ' networks the daemon answers with are'
27 . ' API::Docker::Type::Network (networks->list and'
28 . ' networks->inspect), with the field names the swagger\'s own'
29 . ' in snake_case, and inspect, remove, connect and disconnect'
30 . ' are unchanged on them, composed in from'
31 . ' API::Docker::Role::Entity::Network. This stub refuses';
32  
33 # The croak below is what a caller normally hits. AUTOLOAD is for the one who
34 # swallowed it -- eval { require API::Docker::Network } and then called a
35 # method anyway; the answer has to be the same one, not a bare "Can't locate
36 # object method". DESTROY is defined so it does not reach AUTOLOAD.
37 3 ▶sub AUTOLOAD { croak $REFUSED }
Subroutine AUTOLOAD: called CC=1 SCAR=0.0
38 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
39  
40 croak $REFUSED;
41  
42  
43 1;
44  
45 __END__
« Docker/Image.pm ↑ Summary Docker/Plugin.pm »