commit 8e31a0593451211450cd2276cb6a445d0d0acb33 (patch) parent 48774c8a060fa8aa0c7d8214bd4a55fb27c4e375 Author: Alex Karle <alex@karle.co> Date: Sat, 21 Mar 2020 15:24:49 -0400 refactor: Create basic Perl module scaffolding Diffstat:
M | gloat.pl | | | 6 | +++++- |
A | lib/Euchre/Game.pm | | | 16 | ++++++++++++++++ |
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/gloat.pl b/gloat.pl @@ -4,7 +4,11 @@ # Those who Euchre Gloat never Win # ~ Andy Karle use Mojolicious::Lite; +use FindBin; +use lib "$FindBin::RealBin/lib"; -get '/' => { text => 'Letsigo!' }; +use Euchre::Game; + +get '/' => { text => play() }; app->start; diff --git a/lib/Euchre/Game.pm b/lib/Euchre/Game.pm @@ -0,0 +1,16 @@ +# Euchre::Game -- the Game Logic +use strict; +use warnings; + +package Euchre::Game; + +require Exporter; +our @ISA = qw(Exporter); + +our @EXPORT = qw(play); + +sub play { + return "Let's play some Euchre!"; +} + +1;