summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Command')
-rw-r--r--lib/Travelynx/Command/dumpconfig.pm24
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.