From 9790bb7face1bfc4d6a7389809f91cce9a9844c6 Mon Sep 17 00:00:00 2001
From: Adrian <59370927+adrianfusco@users.noreply.github.com>
Date: Tue, 4 Jan 2022 08:02:27 +0100
Subject: [PATCH] Update/add perl answers (#197)
* New questions and spell check (#181)
Added new questions related with KVM, Libvirt and DNF
* Add CPAN Perl answers
- What is CPAN
- How install a CPAN module
---
exercises/perl/README.md | 41 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/exercises/perl/README.md b/exercises/perl/README.md
index e46f83c..273f065 100644
--- a/exercises/perl/README.md
+++ b/exercises/perl/README.md
@@ -600,8 +600,47 @@ sub printMethod { print "A\n"; };
What is cpan? And cpanm?
+
+CPAN is the Comprehensive Perl Archive Network.
+
+CPANM From the official [App::cpanminus](https://metacpan.org/pod/App::cpanminus):
+"App::cpanminus - get, unpack, build and install modules from CPAN".
+
+[Find CPAN modules](https://metacpan.org/)
+
-How can you install a Perl module?
+How can you install cpanm and a Perl module?
+
+There are some different alternatives to install Perl modules. We will use `cpanm`.
+
+- Install `cpanm`:
+
+```
+$ cpan App::cpanminus
+```
+
+- Install the `Test` module with `cpanm`:
+
+```
+cpanm Test
+```
+
+Now we can test the `Test` installed module:
+
+```
+$ perl -M'Test::Simple tests => 1' -e 'ok( 1 + 1 == 2 );'
+1..1
+ok 1
+```
+
+```
+$ perl -M'Test::Simple tests => 1' -e 'ok( 1 + 1 == 3 );'
+1..1
+not ok 1
+# Failed test at -e line 1.
+# Looks like you failed 1 test of 1.
+```
+
\ No newline at end of file