aboutsummaryrefslogtreecommitdiff
path: root/challenge-107
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-04-06 09:07:46 +0100
committerGitHub <noreply@github.com>2021-04-06 09:07:46 +0100
commitd811e1f5bcff48ce346bbc48328658bc35ef7078 (patch)
tree301a7559afea144b54638e0d580b5e4cefa6ebad /challenge-107
parent7d23d5aae13bc5cbe1932621af730d4445ffd7a9 (diff)
parentf37645323a12f7b5cd88e90797c6dd0b791b3ffa (diff)
downloadperlweeklychallenge-club-d811e1f5bcff48ce346bbc48328658bc35ef7078.tar.gz
perlweeklychallenge-club-d811e1f5bcff48ce346bbc48328658bc35ef7078.tar.bz2
perlweeklychallenge-club-d811e1f5bcff48ce346bbc48328658bc35ef7078.zip
Merge pull request #3838 from choroba/ech107
Add solution to 107: List Methods by E. Choroba
Diffstat (limited to 'challenge-107')
-rwxr-xr-xchallenge-107/e-choroba/perl/ch-1.pl2
-rwxr-xr-xchallenge-107/e-choroba/perl/ch-2.pl12
-rw-r--r--challenge-107/e-choroba/perl/lib/Calc.pm11
3 files changed, 25 insertions, 0 deletions
diff --git a/challenge-107/e-choroba/perl/ch-1.pl b/challenge-107/e-choroba/perl/ch-1.pl
new file mode 100755
index 0000000000..15e4e6f184
--- /dev/null
+++ b/challenge-107/e-choroba/perl/ch-1.pl
@@ -0,0 +1,2 @@
+#!/usr/bin/perl
+exec '../../../challenge-043/e-choroba/perl/ch-2.pl'
diff --git a/challenge-107/e-choroba/perl/ch-2.pl b/challenge-107/e-choroba/perl/ch-2.pl
new file mode 100755
index 0000000000..4690df6ed8
--- /dev/null
+++ b/challenge-107/e-choroba/perl/ch-2.pl
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use feature qw{ say };
+
+use lib './lib';
+use Calc ();
+
+say for keys %{Calc::};
+
+# Inlining the package in the main file excludes the BEGIN. Not
+# specifying the "no import ()" adds "import" to the list.
diff --git a/challenge-107/e-choroba/perl/lib/Calc.pm b/challenge-107/e-choroba/perl/lib/Calc.pm
new file mode 100644
index 0000000000..b5d92fc718
--- /dev/null
+++ b/challenge-107/e-choroba/perl/lib/Calc.pm
@@ -0,0 +1,11 @@
+package Calc;
+
+use warnings;
+use strict;
+
+sub new { bless {}, shift; }
+sub add { }
+sub mul { }
+sub div { }
+
+__PACKAGE__