HiD/App/Command/config.pm

filter: Statementstmt 100% 38 / 38 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 11 / 11 Podpod n/a totaltotal 100% 51 / 51 CC 3 SCAR 3.8
CC
3
Cov
100%
_run
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« HiD/Processor/Handlebars.pm ↑ Summary HiD/File.pm »
1 # ABSTRACT: dump configuration
2  
3  
4 package HiD::App::Command::config;
5 4 $HiD::App::Command::config::VERSION = '1.5';
6 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 extends 'HiD::App::Command';
8 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 4 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use autodie;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use warnings qw/ FATAL utf8 /;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use open qw/ :std :utf8 /;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 4 ▶use charnames qw/ :full /;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 ▶use feature qw/ unicode_strings /;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 sub _run {
19 4 ▶ my( $self , $opts , $args ) = @_;
Subroutine _run: called CC=3 SCAR=11.0
20  
21 4 ▶ $args = [ 'config' ] unless $args->[0];
Branch: 1 branch
BranchTrueFalseTotal
unless $args->[0] 3 1 4
22  
23 4 ▶ use DDP;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 4 my $out;
25 4 $out .= p $self->hid->$_ foreach @$args;
26  
27 4 print $out;
28 }
29  
30 4 __PACKAGE__->meta->make_immutable;
31 4 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding utf-8
38  
39 =head1 NAME
40  
41 HiD::App::Command::config - dump configuration
42  
43 =head1 SYNOPSIS
44  
45 $ hid config
46 \ {
47 destination "_site",
48 include_dir "_includes",
49 layout_dir "_layouts",
50 posts_dir "_posts",
51 source "."
52 }
53 $ hid config pages
54 [ massive output elided ]
55  
56 =head1 DESCRIPTION
57  
58 Dumps the active configuration (using L<Data::Printer>)
59  
60 If given an argument, will dump the corresponding attribute from the active
61 L<HiD> instance. This can be useful when debugging, because it allows you to
62 see precisely what data structures are being built.
63  
64 =head1 SEE ALSO
65  
66 See L<HiD::App::Command> for additional command line options supported by all
67 sub commands.
68  
69 =head1 VERSION
70  
71 version 1.5
72  
73 =head1 AUTHOR
74  
75 John SJ Anderson <genehack@genehack.org>
76  
77 =head1 COPYRIGHT AND LICENSE
78  
79 This software is copyright (c) 2014 by John SJ Anderson.
80  
81 This is free software; you can redistribute it and/or modify it under
82 the same terms as the Perl 5 programming language system itself.
83  
84 =cut
« HiD/Processor/Handlebars.pm ↑ Summary HiD/File.pm »