File Coverage

blib/lib/Dita/GB/Standard/Types.pm
Criterion Covered Total %
statement 17 17 100.0
branch 3 6 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 24 28 85.7


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2             #-------------------------------------------------------------------------------
3             # The Types of Corpus Available in the Gearhart-Brenan File Naming Standard
4             # Philip R Brenan at gmail dot com, Appa Apps Ltd Inc., 2019
5             #-------------------------------------------------------------------------------
6             # podDocumentation
7             package Dita::GB::Standard::Types;
8             our $VERSION = 20190911;
9             require v5.24;
10 1     1   556 use warnings FATAL => qw(all);
  1         7  
  1         31  
11 1     1   5 use strict;
  1         1  
  1         137  
12              
13             # podDocumentation
14              
15             =pod
16              
17             =encoding utf-8
18              
19             =head1 Name
20              
21             Dita::GB::Standard::Types - The Types of Corpus Available in the
22             Gearhart-Brenan File Naming Standard.
23              
24             =head1 Synopsis
25              
26             The B is one way of naming files to enable global collaboration
27             through uncoordinated content sharing.
28              
29             The B creates a human readable, deterministic file name which
30             depends solely on the content to be stored in that file. Such file names are
31             guaranteed to differ between files that contain differing content while being
32             frequently identical for files that contain identical content.
33              
34             The B name for a file depends on the type of corpus it occurs in.
35             The following sections describe the types of corpus currently available and the
36             algorithm for computing the B name for each such corpus.
37              
38             =head2 Dita
39              
40             The B corpus contains topic and map files that conform to the
41             L
42             standard. The B names for these files can be computed via L
43             Standard for Dita|http://metacpan.org/pod/Dita::GB::Standard>.
44              
45             =head1 Author
46              
47             L
48              
49             L
50              
51             =head1 Copyright
52              
53             Copyright (c) 2019 Philip R Brenan.
54              
55             This module is free software. It may be used, redistributed and/or modified
56             under the same terms as Perl itself.
57              
58             =cut
59              
60             # Tests and documentation
61              
62             sub test
63 1     1 0 11 {my $p = __PACKAGE__;
64 1         8 binmode($_, ":utf8") for *STDOUT, *STDERR;
65 1 50       52 return if eval "eof(${p}::DATA)";
66 1         45 my $s = eval "join('', <${p}::DATA>)";
67 1 50       5 $@ and die $@;
68 1     1   534 eval $s;
  1         54079  
  1         10  
  1         49  
69 1 50       318 $@ and die $@;
70 1         105 1
71             }
72              
73             test unless caller;
74              
75             1;
76             # podDocumentation
77             __DATA__