diff --git a/README.md b/README.md index df4dbd5..8685bf1 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,17 @@ This repository contains the server application for the LocalSpend system. See a The server app. is written in [Perl](https://www.perl.org/). +Admin. portal pages are templated using [HTML::EP](https://metacpan.org/pod/distribution/HTML-EP/lib/HTML/EP.pod). + | Technology | Description | Link | |-------------|--------------------------------------|---------------------| | Mojolicious | Perl Web framework | [Link][mojolicious] | | PostgreSQL | Relational database managment system | [Link][postgresql] | +| SQLite | Relational database managment system | [Link][sqlite] | [mojolicious]: https://mojolicious.org/ [postgresql]: https://www.postgresql.org/ +[sqlite]: https://sqlite.org/index.html ## Features @@ -122,7 +126,7 @@ Test files are found in the `t/` directory. ## Code Formatting -TODO +Run `perlcritic lib/` to format all Perl files with [Perl::Critic](https://metacpan.org/pod/Perl::Critic). ## Documentation diff --git a/cpanfile b/cpanfile index 041c680..8c2d742 100644 --- a/cpanfile +++ b/cpanfile @@ -28,6 +28,7 @@ requires 'Text::CSV'; requires 'Try::Tiny'; requires 'Throwable::Error'; requires 'Minion'; +requires 'Perl::Critic'; requires 'WWW::FCM::HTTP'; on 'test' => sub { diff --git a/lib/Pear/LocalLoop/Controller/Admin/Reports.pm b/lib/Pear/LocalLoop/Controller/Admin/Reports.pm index aff6bc9..5d0991f 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/Reports.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/Reports.pm @@ -73,7 +73,7 @@ sub pg_or_sqlite { return \$sqlite_sql; } else { $c->app->log->warn('Unknown Driver Used'); - return undef; + return; } } diff --git a/lib/Pear/LocalLoop/Controller/Admin/Transactions.pm b/lib/Pear/LocalLoop/Controller/Admin/Transactions.pm index 514f326..bf3056b 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/Transactions.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/Transactions.pm @@ -113,7 +113,7 @@ sub pg_or_sqlite { return \$sqlite_sql; } else { $c->app->log->warn('Unknown Driver Used'); - return undef; + return; } } diff --git a/lib/Pear/LocalLoop/Controller/Api/Categories.pm b/lib/Pear/LocalLoop/Controller/Api/Categories.pm index 0ffeae7..84bd9c1 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Categories.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Categories.pm @@ -79,7 +79,7 @@ sub pg_or_sqlite { return \$sqlite_sql; } else { $c->app->log->warn('Unknown Driver Used'); - return undef; + return; } } diff --git a/lib/Pear/LocalLoop/Controller/Api/Stats.pm b/lib/Pear/LocalLoop/Controller/Api/Stats.pm index 1b78d8b..d9d127c 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Stats.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Stats.pm @@ -505,7 +505,7 @@ sub pg_or_sqlite { return \$sqlite_sql; } else { $c->app->log->warn('Unknown Driver Used'); - return undef; + return; } } diff --git a/lib/Pear/LocalLoop/Controller/Api/V1/Customer/Graphs.pm b/lib/Pear/LocalLoop/Controller/Api/V1/Customer/Graphs.pm index f48e52b..2f8e4fc 100644 --- a/lib/Pear/LocalLoop/Controller/Api/V1/Customer/Graphs.pm +++ b/lib/Pear/LocalLoop/Controller/Api/V1/Customer/Graphs.pm @@ -160,7 +160,7 @@ sub pg_or_sqlite { return \$sqlite_sql; } else { $c->app->log->warn('Unknown Driver Used'); - return undef; + return; } } diff --git a/lib/Pear/LocalLoop/Controller/Root.pm b/lib/Pear/LocalLoop/Controller/Root.pm index ef7b4d3..c2dddba 100644 --- a/lib/Pear/LocalLoop/Controller/Root.pm +++ b/lib/Pear/LocalLoop/Controller/Root.pm @@ -16,7 +16,7 @@ sub under { return 1; } $c->redirect_to('/'); - return undef; + return; } sub auth_login { diff --git a/lib/Pear/LocalLoop/Schema/ResultSet/Leaderboard.pm b/lib/Pear/LocalLoop/Schema/ResultSet/Leaderboard.pm index a5ba33b..5c94898 100644 --- a/lib/Pear/LocalLoop/Schema/ResultSet/Leaderboard.pm +++ b/lib/Pear/LocalLoop/Schema/ResultSet/Leaderboard.pm @@ -13,7 +13,7 @@ sub get_latest { my $type_result = $self->find_by_type( $type ); - return undef unless defined $type_result; + return unless defined $type_result; my $latest = $type_result->search_related('sets', {}, { order_by => { -desc => 'date' }, @@ -29,7 +29,7 @@ sub create_new { my $type_result = $self->find_by_type($type); - return undef unless $type_result; + return unless $type_result; return $type_result->create_new($date); } diff --git a/lib/Pear/LocalLoop/Schema/Script/DeploymentHandler.pm b/lib/Pear/LocalLoop/Schema/Script/DeploymentHandler.pm index a0a789c..9372a9f 100644 --- a/lib/Pear/LocalLoop/Schema/Script/DeploymentHandler.pm +++ b/lib/Pear/LocalLoop/Schema/Script/DeploymentHandler.pm @@ -1,5 +1,8 @@ package Pear::LocalLoop::Schema::Script::DeploymentHandler; +use strict; +use warnings; + use MooX::Options::Actions; use Module::Runtime qw/ use_module /; use DBIx::Class::DeploymentHandler;