diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2021-04-06 09:07:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-06 09:07:46 +0100 |
| commit | d811e1f5bcff48ce346bbc48328658bc35ef7078 (patch) | |
| tree | 301a7559afea144b54638e0d580b5e4cefa6ebad /challenge-107 | |
| parent | 7d23d5aae13bc5cbe1932621af730d4445ffd7a9 (diff) | |
| parent | f37645323a12f7b5cd88e90797c6dd0b791b3ffa (diff) | |
| download | perlweeklychallenge-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-x | challenge-107/e-choroba/perl/ch-1.pl | 2 | ||||
| -rwxr-xr-x | challenge-107/e-choroba/perl/ch-2.pl | 12 | ||||
| -rw-r--r-- | challenge-107/e-choroba/perl/lib/Calc.pm | 11 |
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__ |
