Docker/Container.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/Config.pm ↑ Summary Docker/Image.pm »
1 package API::Docker::Container;
2 # ABSTRACT: Removed in 0.004 -- replaced by API::Docker::Type::ContainerSummary and ContainerInspectResponse
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::Container 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 . ' containers the daemon answers with are'
27 . ' API::Docker::Type::ContainerSummary (containers->list) and'
28 . ' API::Docker::Type::ContainerInspectResponse'
29 . ' (containers->inspect), with the field names the swagger\'s'
30 . ' own in snake_case, and start, stop, logs, is_running and the'
31 . ' rest are unchanged on them, composed in from'
32 . ' API::Docker::Role::Entity::Container. This stub refuses';
33  
34 # The croak below is what a caller normally hits. AUTOLOAD is for the one who
35 # swallowed it -- eval { require API::Docker::Container } and then called a
36 # method anyway; the answer has to be the same one, not a bare "Can't locate
37 # object method". DESTROY is defined so it does not reach AUTOLOAD.
38 3 ▶sub AUTOLOAD { croak $REFUSED }
Subroutine AUTOLOAD: called CC=1 SCAR=0.0
39 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
40  
41 croak $REFUSED;
42  
43  
44 1;
45  
46 __END__
« Docker/Config.pm ↑ Summary Docker/Image.pm »