MetaCurator/Validate.pm untested

filter: Statementstmt 0.0% 0 / 42 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 62 CC 5 SCAR 26.1
CC
5
Cov
0%
validate
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 13.7
1 package CPAN::MetaCurator::Validate;
2  
3 use boolean;
4 use feature 'say';
5 use parent 'CPAN::MetaCurator::Export';
6 use warnings qw(FATAL utf8); # Fatalize encoding glitches.
7  
8 use Data::Dumper::Concise; # For Dumper().
9  
10 use File::Slurper 'read_lines';
11 use File::Spec;
12  
13 our $VERSION = '1.29';
14  
15 # -----------------------------------------------
16  
17 sub validate
18 {
19 my($self) = @_;
20  
21 $self -> init_config;
22 $self -> init_db;
23  
24 # Phase 1: Build the DAG_Node tree.
25  
26 my($pad) = $self -> build_pad;
27 my($root) = $self -> build_tree($pad);
28  
29 # Phase 4; Build the JS Tree.
30 # New style.
31  
32 my($description);
33 my($previous_depth);
34 my($uri);
35  
36 $root -> walk_down
37 ({
38 callback => sub
39 {
40 my($node, $options) = @_;
41 $attributes = $node -> attributes;
42 $name = $node -> name;
43  
44 if ($$options{_depth} == 0) # Root.
45 {
46 }
47 elsif ($$options{_depth} == 1) # Topics.
48 {
49 }
50 elsif ($$options{_depth} == 2) # Module name || 'Notes for ...' || 'See also'.
51 {
52 $$pad{count}{leaf}++;
53  
54 $description = $$attributes{description};
55 $uri = $$attributes{uri} || '#';
56 }
57 elsif ($$options{_depth} == 3) # 'Notes for ...' || 'See also' entries.
58 {
59 }
60  
61 $previous_depth = $$options{_depth};
62  
63 return 1;
64  
65 }, # End of callback.
66 _depth => 0,
67 });
68  
69 return 0;
70  
71 } # End of validate.
72  
73 # --------------------------------------------------
74  
75 1;
76  
77 =pod
78  
79 =head1 Machine-Readable Change Log
80  
81 The file Changes was converted into Changelog.ini by L<Module::Metadata::Changes>.
82  
83 =head1 Version Numbers
84  
85 Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.
86  
87 =head1 Support
88  
89 Email the author.
90  
91 =head1 Author
92  
93 L<CPAN::MetaCurator> was written by Ron Savage I<E<lt>ron@savage.net.auE<gt>> in 2025.
94  
95 My homepage: L<https://savage.net.au/>.
96  
97 =head1 Copyright
98  
99 Australian copyright (c) 2025, Ron Savage.
100  
101 All Programs of mine are 'OSI Certified Open Source Software';
102 you can redistribute them and/or modify them under the terms of
103 The Perl License, a copy of which is available at:
104 http://dev.perl.org/licenses/
105  
106 =cut