Re: Modules

Levi Elias Nystad-Johansen via beginners <[email protected]> Tue, 24 Oct 2023 17:05:47 +0000
Newsgroups gmane.comp.lang.perl.beginners
Message-ID <kidC1utiEeKJ0mKmCw7P3CkKbnB2UTtQ0f0MV_KlJsDy2773Y9NZBemoqwgr1Izz01Og_nEdQGuQIS4Emgg-Kh45B4xjN2WYflcvKdGlOQA=@protonmail.com>
I use modules for complex things that I might get wrong. To re-use other people's code is often better than to re-invent their solutions.

https://metacpan.org/pod/WWW::Mechanize::Examples has some good examples of useful scripts that are short and simple.
Imagine how hard it would be to write the same scripts without the module.

When I have an issue that I think others must also have faced, I look for a module to solve the issue.

But I am critical to modules that are outdated/abandoned, heavy with many dependencies, or unproven with few downloads etc.

I also remove modules when I no longer need them. I find this easier with App::cpanminus

- L

-------- Original Message --------
On 24. okt. 2023, 17:31, William Torrez Corea wrote:

> When I must use modules and when I don't must use?
>
> I am working without modules, only i use:
>
> - Subroutines
> - Control flow
>
> My programs are short and simple, they do not exceed 15 lines. I think that I need more practice and learn more about Perl. I have limited knowledge in Perl.
>
> --
>
> With kindest regards, William.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
> ⠈⠳⣄⠀⠀⠀⠀