File Coverage

blib/lib/WebDyne/Static.pm
Criterion Covered Total %
statement 22 25 88.0
branch n/a
condition 3 6 50.0
subroutine 7 8 87.5
pod 0 1 0.0
total 32 40 80.0


line stmt bran cond sub pod time code
1             #
2             # This file is part of WebDyne.
3             #
4             # This software is copyright (c) 2026 by Andrew Speer .
5             #
6             # This is free software; you can redistribute it and/or modify it under
7             # the same terms as the Perl 5 programming language system itself.
8             #
9             # Full license text is available at:
10             #
11             #
12             #
13              
14              
15             package WebDyne::Static;
16              
17              
18             # Compiler Pragma
19             #
20 1     1   572 use strict qw(vars);
  1         3  
  1         53  
21 1     1   7 use vars qw($VERSION);
  1         2  
  1         72  
22 1     1   6 use warnings;
  1         3  
  1         96  
23 1     1   6 no warnings qw(uninitialized);
  1         3  
  1         69  
24              
25              
26             # Utilities, constants
27             #
28 1     1   7 use WebDyne::Constant;
  1         2  
  1         10  
29 1     1   11 use WebDyne::Util;
  1         2  
  1         11  
30              
31              
32             # Version information in a format
33             #
34             $VERSION='2.075';
35              
36              
37             # Debug
38             #
39             0 && debug("%s loaded, version $VERSION");
40              
41              
42             # And done
43             #
44             1;
45              
46             #------------------------------------------------------------------------------
47              
48              
49             sub import {
50              
51              
52             # Will only work if called from within a __PERL__ block in WebDyne
53             #
54 1   50 1   20 my $self_cr=UNIVERSAL::can(scalar caller, 'self') || return;
55 1   50     5 my $self=$self_cr->() || return;
56 1   50     8 my $meta_hr=$self->meta() || return err();
57 1         16 $meta_hr->{'static'}=1;
58              
59             }
60              
61              
62             sub handler : method {
63              
64              
65             # Handler is a no-op, all work is done by filter code. Need a handler so
66             # module is seen by WebDyne autoload method when tracking back through
67             # chained modules
68             #
69 0     0 0   my $self=shift();
70 0           $self->static(1);
71 0           $self->SUPER::handler(@_);
72              
73             }
74             __END__