Add a dumpconfig command, mostly useful to debug Docker setups
This commit is contained in:
parent
c23334896d
commit
ecedc6a4f2
1 changed files with 24 additions and 0 deletions
24
lib/Travelynx/Command/dumpconfig.pm
Normal file
24
lib/Travelynx/Command/dumpconfig.pm
Normal file
|
@ -0,0 +1,24 @@
|
|||
package Travelynx::Command::dumpconfig;
|
||||
use Mojo::Base 'Mojolicious::Command';
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
has description => 'Dump current configuration';
|
||||
|
||||
has usage => sub { shift->extract_usage };
|
||||
|
||||
sub run {
|
||||
my ($self) = @_;
|
||||
|
||||
print Dumper( $self->app->config );
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Usage: index.pl dumpconfig
|
||||
|
||||
Dumps the current configuration (travelynx.conf) to stdout.
|
Loading…
Reference in a new issue