From 8e31a0593451211450cd2276cb6a445d0d0acb33 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sat, 21 Mar 2020 15:24:49 -0400 Subject: [PATCH] refactor: Create basic Perl module scaffolding --- gloat.pl | 6 +++++- lib/Euchre/Game.pm | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/Euchre/Game.pm diff --git a/gloat.pl b/gloat.pl index 49977e7..60d0112 100755 --- 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 new file mode 100644 index 0000000..961ae69 --- /dev/null +++ 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; -- libgit2 1.1.1