From f37645323a12f7b5cd88e90797c6dd0b791b3ffa Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Mon, 5 Apr 2021 21:54:17 +0200 Subject: Add solution to 107: List Methods by E. Choroba Reuse 043 for the solution of Self-descriptive Numbers. --- challenge-107/e-choroba/perl/ch-1.pl | 2 ++ challenge-107/e-choroba/perl/ch-2.pl | 12 ++++++++++++ challenge-107/e-choroba/perl/lib/Calc.pm | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100755 challenge-107/e-choroba/perl/ch-1.pl create mode 100755 challenge-107/e-choroba/perl/ch-2.pl create mode 100644 challenge-107/e-choroba/perl/lib/Calc.pm (limited to 'challenge-107') 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__ -- cgit