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