lib/Web/VWF/Data/index.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« example/data/states.pm ↑ Summary
1 package Web::VWF::Data::index;
2  
3 # The database associated with the index template file
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Database::Abstraction;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use version; our $VERSION = version->declare('0.004.3');
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our @ISA = ('Database::Abstraction');
13  
14 1 1;
15  
16 =encoding utf8
17  
18 =head1 NAME
19  
20 Web::VWF::Data::index - The database behind the index page
21  
22 =head1 VERSION
23  
24 Version 0.004.3
25  
26 =head1 DESCRIPTION
27  
28 A L<Database::Abstraction> for the table C<index>: a file called F<index.csv>
29 (or F<.sql>, F<.xml>, ...) in the database directory, see C<databases> in
30 L<Web::VWF/CONFIGURATION>. It has Database::Abstraction's defaults, so a CSV
31 file is separated by C<!> and keyed on the column C<entry>. The example site's
32 is F<example/databases/index.csv>:
33  
34 entry!email
35 bob!bob@example.com
36  
37 L<Web::VWF::Display::index> reads the address of the person named by C<?person=>
38 with C<$index-E<gt>email({ entry =E<gt> $person })>. A page is given this handle
39 as C<index>, see L<Web::VWF/CONFIGURATION>.
40  
41 =head1 METHODS
42  
43 It has none of its own. C<new> and the queries are those of
44 L<Database::Abstraction>.
45  
46 =head2 new
47  
48 =head3 API SPECIFICATION
49  
50 =head4 INPUT
51  
52 {
53 directory => { type => 'string' }, # where index.csv is
54 logger => { type => 'object', optional => 1 },
55 }
56  
57 =head4 OUTPUT
58  
59 { type => 'object', isa => 'Web::VWF::Data::index' }
60  
61 =head1 AUTHOR
62  
63 Nigel Horne, C<< <njh at nigelhorne.com> >>
64  
65 =head1 LICENCE AND COPYRIGHT
66  
67 Copyright 2010-2026 Nigel Horne.
68  
69 Usage is subject to the GPL2 licence terms.
70 If you use it,
71 please let me know.
72  
73 =cut
« example/data/states.pm ↑ Summary