diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-17 07:11:04 -0400 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-17 07:11:04 -0400 |
commit | ecedc6a4f221f286fb2c9b006d2434fdb0f98bc7 (patch) | |
tree | ab836354d01c0fc4e553e2ad0c69283f2fad1178 /lib/Travelynx | |
parent | c23334896dfd48d5ffc24811f26fb6af8067a860 (diff) |
Add a dumpconfig command, mostly useful to debug Docker setups
Diffstat (limited to 'lib/Travelynx')
-rw-r--r-- | lib/Travelynx/Command/dumpconfig.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/dumpconfig.pm b/lib/Travelynx/Command/dumpconfig.pm new file mode 100644 index 0000000..d2a6761 --- /dev/null +++ b/lib/Travelynx/Command/dumpconfig.pm @@ -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. |