Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

why isn't cpan like npm?

by CodeDmitry (Initiate)
on Apr 17, 2018 at 21:03 UTC ( [id://1213085]=perlquestion: print w/replies, xml ) Need Help??

CodeDmitry has asked for the wisdom of the Perl Monks concerning the following question:

I started playing with PERL over 13 years ago; I saw it as a wonderful language that made easy things easy, and hard things possible.

To date, I fear using CPAN because of past experience having to go through tens of minutes of questions in command line before I hopefully can get to entering command lines, at which point it tells me my MinGW ran out of memory, and I can't use it on this particular system.

So I fear that if I do use CPAN, if I choose to use it for a school project, or give it to a friend, they simply won't be able to or won't be willing to get the modules needed to use the scripts I write.

Then, roughly 3 years ago, I tried NPM and NodeJS and the first thing I thought was: this... is just Perl in different clothing:

Everything just worked, with very rare module not working being easy to ask for feedback on Github.

So I come here to ask a few questions.

1. Why isn't there an NPM for Perl?

2. Why is JSON so popular if Perl already had the same concepts long before JS existed.

How is {foo: 1, bar: {}, gaz: []} any different than {foo => 1, bar => {}, gaz => []}?

I understand lisp had similar concepts, but lisp didn't actually integrate dictionaries into their language to the same level as lists.

3. Why is there so few Perl versions for windows, while there are SO MANY JavaScript versions for Windows(every browser, JScript, nashorn for java, NodeJS)?

Replies are listed 'Best First'.
Re: why isn't cpan like npm?
by stevieb (Canon) on Apr 17, 2018 at 22:19 UTC
    "To date, I fear using CPAN because of past experience having to go through tens of minutes of questions in command line"

    Citations please, specific distribution names required. This is not my near 20 year experience. A minute fraction maybe, but that's for your own good.

    "1. Why isn't there an NPM for Perl?"

    As someone who dabbles in JS/JQuery very, very infrequently, can you elaborate on what NPM is for so that those in this neighbourhood who may be ignorant (like me) can get a better picture?

    "2. Why is JSON so popular if Perl already had the same concepts long before JS existed."

    JSON, although related to JS by name, is simply a standard data storage format. XML has come into presence as well, but it (imho) sucks. It's just another storage mechanism that works cross-platform. It has nothing to do with Perl at all. In fact, Perl data structures match more closely to JSON structures than any other language. That said, I have given examples of using JSON to transfer serial data between Perl, Python, C, C++, C# ad-infinitum. Perl has core (and external) storage formats, but the ones you may be thinking of are not easily across platforms. Either way, JSON is just as popular as something like SQLite for example... it's just a way to store, transact upon and use data across platforms and languages.

    "3. Why is there so few Perl versions for windows..."

    berrybrew.

    -stevieb

      "Citations please, specific distribution names required."

      While some modules do prompt interactively, I think they mean the first time setup when running cpan, as they continue "... before I hopefully can get to entering command lines".

      1. Here's a direct paste of me running cpan install Parse::Lex, :\ not a very great experience

      $ cpan install Parse::Lex /usr/lib/perl5/5.8/CPAN/Config.pm initialized. CPAN is the world-wide archive of perl resources. It consists of about 100 sites that all replicate the same contents all around the globe. Many countries have at least one CPAN site already. The resources found on CPAN are easily accessible with the CPAN.pm module. If you want to use CPAN.pm, you have to configure it properly. If you do not want to enter a dialog now, you can answer 'no' to this question and I'll try to autoconfigure. (Note: you can revisit this dialog anytime later by typing 'o conf init' at the cpan prompt.) Are you ready for manual configuration? [yes] The following questions are intended to help you with the configuration. The CPAN module needs a directory of its own to cache important index files and maybe keep a temporary mirror of CPAN files. This may be a site-wide directory or a personal directory. First of all, I'd like to create this directory. Where? CPAN build and cache directory? [/home/Dmitry/.cpan] If you want, I can keep the source files after a build in the cpan home directory. If you choose so then future builds will take the files from there. If you don't want to keep them, answer 0 to the next question. How big should the disk cache be for keeping the build directories with all the intermediate files? Cache size for build directory (in MB)? [10] By default, each time the CPAN module is started, cache scanning is performed to keep the cache size in sync. To prevent from this, disable the cache scanning with 'never'. Perform cache scanning (atstart or never)? [atstart] To considerably speed up the initial CPAN shell startup, it is possible to use Storable to create a cache of metadata. If Storable is not available, the normal index mechanism will be used. Cache metadata (yes/no)? [yes] The next option deals with the charset your terminal supports. In general CPAN is English speaking territory, thus the charset does not matter much, but some of the aliens out there who upload their software to CPAN bear names that are outside the ASCII range. If your terminal supports UTF-8, you say no to the next question, if it supports ISO-8859-1 (also known as LATIN1) then you say yes, and if it supports neither nor, your answer does not matter, you will not be able to read the names of some authors anyway. If you answer no, names will be output in UTF-8. Your terminal expects ISO-8859-1 (yes/no)? [yes] If you have one of the readline packages (Term::ReadLine::Perl, Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN shell will have history support. The next two questions deal with the filename of the history file and with its size. If you do not want to set this variable, please hit SPACE RETURN to the following question. File to save your history? [/home/Dmitry/.cpan/histfile] Number of lines to save? [100] The CPAN module can detect when a module that which you are trying to build depends on prerequisites. If this happens, it can build the prerequisites for you automatically ('follow'), ask you for confirmation ('ask'), or just ignore them ('ignore'). Please set your policy to one of the three values. Policy on building prerequisites (follow, ask or ignore)? [ask] The CPAN module will need a few external programs to work properly. Please correct me, if I guess the wrong path for a program. Don't panic if you do not have some of them, just press ENTER for those. To disable the use of a download program, you can type a space followed by ENTER. Where is your gzip program? [/bin/gzip] Where is your tar program? [/bin/tar] Warning: unzip not found in PATH Where is your unzip program? [] Where is your make program? [/bin/make] Warning: lynx not found in PATH Where is your lynx program? [] Where is your wget program? [/c/Program Files (x86)/sox-14-4-2/wget] Warning: ncftpget not found in PATH Where is your ncftpget program? [] Warning: ncftp not found in PATH Where is your ncftp program? [] Where is your ftp program? [/bin/ftp] Warning: gpg not found in PATH Where is your gpg program? [] What is your favorite pager program? [/bin/less] What is your favorite shell? Every Makefile.PL is run by perl in a separate process. Likewise we run 'make' and 'make install' in processes. If you have any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to pass to the calls, please specify them here. If you don't understand this question, just press ENTER. Parameters for the 'perl Makefile.PL' command? Typical frequently used settings: PREFIX=~/perl non-root users (please see manual for more hin +ts) Your choice: [] Parameters for the 'make' command? Typical frequently used setting: -j3 dual processor system Your choice: [] Parameters for the 'make install' command? Typical frequently used setting: UNINST=1 to always uninstall potentially conflicting files Your choice: [] Sometimes you may wish to leave the processes run by CPAN alone without caring about them. As sometimes the Makefile.PL contains question you're expected to answer, you can set a timer that will kill a 'perl Makefile.PL' process after the specified time in seconds. If you set this value to 0, these processes will wait forever. This is the default and recommended setting. Timeout for inactivity during Makefile.PL? [0] If you're accessing the net via proxies, you can specify them in the CPAN configuration or via environment variables. The variable in the $CPAN::Config takes precedence. Your ftp_proxy? Your http_proxy? Your no_proxy? You have no /home/Dmitry/.cpan/sources/MIRRORED.BY I'm trying to fetch one CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Now we need to know where your favorite CPAN sites are located. Push a few sites onto the array (just in case the first on the array won't work). If you are mirroring CPAN to your local workstation, specify a file: URL. First, pick a nearby continent and country (you can pick several of each, separated by spaces, or none if you just want to keep your existing selections). Then, you will be presented with a list of URLs of CPAN mirrors in the countries you selected, along with previously selected URLs. Select some of those URLs, or just keep the old list. Finally, you will be prompted for any extra URLs -- file:, ftp:, or http: -- that host a CPAN mirror. (1) Africa (2) Asia (3) Europe (4) North America (5) Oceania (6) South America Select your continent (or several nearby continents) [] Sorry! since you don't have any existing picks, you must make a geographic selection. (1) Africa (2) Asia (3) Europe (4) North America (5) Oceania (6) South America Select your continent (or several nearby continents) [] Sorry! since you don't have any existing picks, you must make a geographic selection. (1) Africa (2) Asia (3) Europe (4) North America (5) Oceania (6) South America Select your continent (or several nearby continents) [] 4 Sorry! since you don't have any existing picks, you must make a geographic selection. (1) Canada (2) Costa Rica (3) Mexico (4) United States Select your country (or several nearby countries) [] 1 Sorry! since you don't have any existing picks, you must make a geographic selection. (1) ftp://CPAN.mirror.rafal.ca/pub/CPAN/ (2) ftp://ftp.ottix.net/pub/CPAN/ (3) ftp://mirror.csclub.uwaterloo.ca/CPAN/ (4) ftp://mirror.its.dal.ca/cpan/ (5) http://cpan.metacpan.org/ (6) http://cpan.mirror.colo-serv.net/ (7) http://mirrors.gossamer-threads.com/CPAN/ Select as many URLs as you like (by number), put them on one line, separated by blanks, e.g. '1 4 5' [] 1 Enter another URL or RETURN to quit: [] 2 "file:2/" doesn't look like an URL at first sight. I'll ignore it for now. You can add it to your /usr/lib/perl5/5.8/CPAN/Config.pm later if you're sure it's right. Enter another URL or RETURN to quit: [] 3 "file:3/" doesn't look like an URL at first sight. I'll ignore it for now. You can add it to your /usr/lib/perl5/5.8/CPAN/Config.pm later if you're sure it's right. Enter another URL or RETURN to quit: [] New set of picks: ftp://CPAN.mirror.rafal.ca/pub/CPAN/ commit: wrote /usr/lib/perl5/5.8/CPAN/Config.pm CPAN: Storable loaded ok Fetching with LWP: ftp://CPAN.mirror.rafal.ca/pub/CPAN/authors/01mailrc.txt.gz Going to read /home/Dmitry/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib loaded ok Fetching with LWP: ftp://CPAN.mirror.rafal.ca/pub/CPAN/modules/02packages.details.txt.g +z Going to read /home/Dmitry/.cpan/sources/modules/02packages.details.tx +t.gz Database was generated on Fri, 20 Apr 2018 14:54:55 GMT There's a new CPAN.pm version (v2.16) available! [Current version is v1.7602] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamless upgrad +e while we are running... Fetching with LWP: ftp://CPAN.mirror.rafal.ca/pub/CPAN/modules/03modlist.data.gz Going to read /home/Dmitry/.cpan/sources/modules/03modlist.data.gz Going to write /home/Dmitry/.cpan/Metadata Out of memory during request for 14 bytes, total sbrk() is 267628544 b +ytes! Out of memory during request for 16 bytes, total sbrk() is 267628544 b +ytes! Callback called exit, <FH> line 12. END failed--call queue aborted, <FH> line 12. Out of memory during request for 281 bytes, total sbrk() is 267628544 +bytes!

      quote: As someone who dabbles in JS/JQuery very, very infrequently, can you elaborate on what NPM is for so that those in this neighbourhood who may be ignorant (like me) can get a better picture?

      NPM is a package manager that comes with NodeJS installations. I mention it because I want to understand why Perl, a language with much older and experienced scripting community has so much harder to use package manager than NodeJS.

      quote: Perl data structures match more closely to JSON structures than any other language.

      I have to sidetrack a bit here, Perl modules are largely package based(a weird version of hash tables that are less intuitive to use yet somehow benchmark faster than hash tables). NodeJS modules are just hash tables with a bunch of memory leaks in them.

        You got several replies that said you should be using cpanm instead of cpan. I reiterate it. App::cpanminus is easier, and probably better, than the regular cpan tool in every way I can think. The docs show how it can be bootstrapped to install without using cpan.

        Here I run cpan Parse::Lex on an Intel atom based netbook from >10 years ago, with 1GB RAM (559MB currently in use), note that I've run CPAN before so don't have to tell configure it:

        sudo cpan Parse::Lex [sudo] password for marto: CPAN: Storable loaded ok (v2.53_01) Reading '/home/marto/.local/share/.cpan/Metadata' Database was generated on Fri, 16 Feb 2018 10:41:02 GMT Reading '/home/marto/.local/share/.cpan/sources/authors/01mailrc.txt.g +z' CPAN: Compress::Zlib loaded ok (v2.068) ...................................................................... +......DONE Reading '/home/marto/.local/share/.cpan/sources/modules/02packages.det +ails.txt.gz' Database was generated on Fri, 20 Apr 2018 11:17:02 GMT CPAN: HTTP::Date loaded ok (v6.02) ............. New CPAN.pm version (v2.16) available. [Currently running version is v2.11] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ...............................................................DONE CPAN: LWP::UserAgent loaded ok (v6.15) Fetching with LWP: http://www.cpan.org/modules/03modlist.data.gz CPAN: YAML loaded ok (v1.15) Reading '/home/marto/.local/share/.cpan/sources/modules/03modlist.data +.gz' DONE Writing /home/marto/.local/share/.cpan/Metadata Running install for module 'Parse::Lex' Fetching with LWP: http://www.cpan.org/authors/id/P/PS/PSCUST/ParseLex-2.21.tar.gz CPAN: Digest::SHA loaded ok (v5.95) Fetching with LWP: http://www.cpan.org/authors/id/P/PS/PSCUST/CHECKSUMS Checksum for /home/marto/.local/share/.cpan/sources/authors/id/P/PS/PS +CUST/ParseLex-2.21.tar.gz ok CPAN: File::Temp loaded ok (v0.2304) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v1.4414) CPAN: CPAN::Meta loaded ok (v2.150005) CPAN: Module::CoreList loaded ok (v5.20151213) Configuring P/PS/PSCUST/ParseLex-2.21.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Parse::Template 3.04 not found. Generating a Unix-style Makefile Writing Makefile for Parse::Lex Writing MYMETA.yml and MYMETA.json PSCUST/ParseLex-2.21.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK Running make for P/PS/PSCUST/ParseLex-2.21.tar.gz ---- Unsatisfied dependencies detected during ---- ---- PSCUST/ParseLex-2.21.tar.gz ---- Parse::Template [requires] Running install for module 'Parse::Template' Fetching with LWP: http://www.cpan.org/authors/id/P/PS/PSCUST/ParseTemplate-3.08.tar.gz Checksum for /home/marto/.local/share/.cpan/sources/authors/id/P/PS/PS +CUST/ParseTemplate-3.08.tar.gz ok Configuring P/PS/PSCUST/ParseTemplate-3.08.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Parse::Template Writing MYMETA.yml and MYMETA.json PSCUST/ParseTemplate-3.08.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK Running make for P/PS/PSCUST/ParseTemplate-3.08.tar.gz cp lib/Parse/Template.pm blib/lib/Parse/Template.pm Manifying 1 pod document PSCUST/ParseTemplate-3.08.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/debug.t ..... ok t/rt_58128.t .. ok t/test1.t ..... ok t/test2.t ..... ok t/test3.t ..... ok t/test4.t ..... ok t/test5.t ..... ok t/test6.t ..... ok All tests successful. Files=8, Tests=32, 2 wallclock secs ( 0.20 usr 0.02 sys + 1.22 cusr + 0.12 csys = 1.56 CPU) Result: PASS PSCUST/ParseTemplate-3.08.tar.gz /usr/bin/make test -- OK Running make install Manifying 1 pod document Installing /usr/local/share/perl/5.22.1/Parse/Template.pm Installing /usr/local/man/man3/Parse::Template.3pm Appending installation info to /usr/lib/i386-linux-gnu/perl/5.22/perll +ocal.pod PSCUST/ParseTemplate-3.08.tar.gz /usr/bin/make install -- OK PSCUST/ParseLex-2.21.tar.gz Has already been unwrapped into directory /home/marto/.local/share/. +cpan/build/ParseLex-2.21-SyvmkU PSCUST/ParseLex-2.21.tar.gz Has already been prepared Running make for P/PS/PSCUST/ParseLex-2.21.tar.gz cp lib/Parse/ALex.pm blib/lib/Parse/ALex.pm cp lib/Parse/LexEvent.pm blib/lib/Parse/LexEvent.pm cp lib/Parse/Token-t.pm blib/lib/Parse/Token-t.pm cp lib/Parse/Token.pm blib/lib/Parse/Token.pm cp lib/Parse/CLex.pm blib/lib/Parse/CLex.pm cp lib/Parse/Lex.pm blib/lib/Parse/Lex.pm cp lib/Parse/Trace.pm blib/lib/Parse/Trace.pm cp lib/Parse/YYLex.pm blib/lib/Parse/YYLex.pm Manifying 7 pod documents PSCUST/ParseLex-2.21.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/debug.t ..... ok t/rt_58128.t .. ok t/test1.t ..... ok t/test2.t ..... ok t/test3.t ..... ok t/test4.t ..... ok t/test5.t ..... ok t/test6.t ..... ok t/test7.t ..... ok t/test8.t ..... ok All tests successful. Files=10, Tests=29, 3 wallclock secs ( 0.21 usr 0.03 sys + 2.76 cus +r 0.19 csys = 3.19 CPU) Result: PASS PSCUST/ParseLex-2.21.tar.gz /usr/bin/make test -- OK Running make install Manifying 7 pod documents Installing /usr/local/share/perl/5.22.1/Parse/LexEvent.pm Installing /usr/local/share/perl/5.22.1/Parse/Token-t.pm Installing /usr/local/share/perl/5.22.1/Parse/Token.pm Installing /usr/local/share/perl/5.22.1/Parse/Lex.pm Installing /usr/local/share/perl/5.22.1/Parse/CLex.pm Installing /usr/local/share/perl/5.22.1/Parse/YYLex.pm Installing /usr/local/share/perl/5.22.1/Parse/Trace.pm Installing /usr/local/share/perl/5.22.1/Parse/ALex.pm Installing /usr/local/man/man3/Parse::CLex.3pm Installing /usr/local/man/man3/Parse::LexEvent.3pm Installing /usr/local/man/man3/Parse::Token.3pm Installing /usr/local/man/man3/Parse::Trace.3pm Installing /usr/local/man/man3/Parse::ALex.3pm Installing /usr/local/man/man3/Parse::YYLex.3pm Installing /usr/local/man/man3/Parse::Lex.3pm Appending installation info to /usr/lib/i386-linux-gnu/perl/5.22/perll +ocal.pod PSCUST/ParseLex-2.21.tar.gz /usr/bin/make install -- OK

        Are you sure you're not hitting a limit (for example) enforced on your user? Also perl 5.8 is ancient, and as explained earlier, cpanm is much better than cpan. Essentially it looks like you're hitting a system limit and are running a very old perl when the modern world is much better :)

        /usr/lib/perl5/5.8/CPAN/Config.pm initialized.

        that answers the question: youre complaining about Perl from 13 years ago

Re: why isn't cpan like npm?
by marto (Cardinal) on Apr 18, 2018 at 06:16 UTC

    Hi, let me try to answer some of these points, if I've misunderstood what you're asking please correct me.

    "I fear using CPAN because of past experience having to go through tens of minutes of questions in command line before I hopefully can get to entering command line"

    You don't have to do this. The first time (or if you do o conf init within cpan), you'll be presented with:

    CPAN.pm requires configuration, but most of it can be done automatical +ly. If you answer 'no' below, you will enter an interactive dialog for eac +h configuration option instead. Would you like to configure as much as possible automatically? [yes]

    "at which point it tells me my MinGW ran out of memory, and I can't use it on this particular system."

    If MinGW is running out of memory consider freeing some up. cpanm has several advantages, it's smaller, faster and works well in low memory (< 512MB) situations. In short, I'd recommend cpanm over cpan regardless of available resources.

    "with very rare module not working being easy to ask for feedback on Github."

    Each perl module will either have an RT queue, a github repo or contact details for the author listed. Failing that you could ask for help in a forum such as this. The barrier for participation is low IMHO.

    "2. Why is JSON so popular if Perl already had the same concepts long before JS existed."

    Again, I'm not sure I understand what you mean here, please correct me if I'm going in the wrong direction. JSON is an open standard data format, Perl is a programming language. Consider the use cases for each different. One advantage of a wildly used open format is that you don't have to be a programmer to quickly get to grips with it. This is helpful to people using a tool (think configuration/data storage) or integrating applications with one another.

    "Why is there so few Perl versions for windows,"

    A lot of people used to roll their own, but honestly, since Strawberry came along, unless you had a very good reason to do so, I wouldn't bother :P It just makes life under windows so much easier. steveb has mentioned his tool for automating builds.

    As an aside, no package management tool is without issue: Programmers were left staring at broken builds and failed installations on Tuesday after someone toppled the Jenga tower of JavaScript.. (Ignore that people using a module to pad a string),You can resurrect any deleted GitHub account name. And this is why we have trust issues, Malicious code in the Node.js npm registry shakes open source trust model.

Re: why isn't cpan like npm?
by Anonymous Monk on Apr 17, 2018 at 21:52 UTC
    are you complaining about Perl the way it was 13 years ago or the way it is today? have you tried Strawberry Perl and App::cpanminus?
Re: why isn't cpan like npm?
by davies (Prior) on Apr 18, 2018 at 15:16 UTC
Re: why isn't cpan like npm?
by KurtZ (Friar) on Apr 17, 2018 at 21:32 UTC
    Javascript is practically the only language running in browsers. (well there used(?) to be VBS)
Re: why isn't cpan like npm?
by choroba (Cardinal) on Apr 18, 2018 at 07:35 UTC
    why isn't cpan like npm?

    Why is a raven like a writing desk?

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: why isn't cpan like npm?
by zakame (Pilgrim) on Apr 20, 2018 at 10:20 UTC

    For #1, there is Shoichi Kaji's cpm. It is not just mimics npm behavior (e.g. installs modules in a local/ directory relative to where you invoked it, instead of system-wide, unless you pass a -g flag,) but it is also a testbed for a new generation of CPAN clients based on Tatsuhiko Miyagawa's Menlo (aka cpanm 2.0) to support parallel fast installs.

Re: why isn't cpan like npm?
by karlgoethebier (Abbot) on Apr 18, 2018 at 12:35 UTC
    "Why is JSON so popular if Perl already had the same concepts long before JS existed."

    I guess: Because Douglas Crockford stopped smoking weed and became reasonable?

    P.S.: Stop worrying and use cpanm (and Strawberry if on M$Dog).

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re: why isn't cpan like npm?
by learnedbyerror (Monk) on Apr 22, 2018 at 22:50 UTC

    Dmitry, I am choosing to interpret your question as an opinion question, since it really is. I started with perl in either late 1988 or early 1989. I started on perl 2 and moved to the newly released perl 3 when it came out. Initially all of my work with it was parsing text files at which it excelled continues to do so today. Somewhere along the way, I started writing network clients and servers with it because it was much simpler and more reliable than other tools available to me. But, when perl 5 came out in 1994, I was blown away! In my mind, at this point, my favorite scripting language became my favorite programming language! Thank you Larry!!!

    My world was rocked again in 1995 when CPAN was created. I could now see the benefits of the internet and open source in a very tangible way. Things continued to improve with perl and continue to do so today. That doesn't mean that all is perfect.

    We have arguments about what should be in perl5 and some strong minded perl devotees who are sure p5p is on a fast track path to hell. Just as other family members wonder while perl 6 is running around in the clouds and not about the real world which by their definition is and can only be perl5. Nonetheless, perl continues to exist as a community that has inspired many others.

    Somethings that have come to my mind over the years

    • perl lent a degree of legitimacy to being a monger :)
    • CPAN was the first code repository to scale
    • perl's cpan tool was the first tool to pull code from a repository, test and install code on a local machine
    • Others languages, repositories and package installers such as Python( PyPi, pip), JavaScript( npm, npm), .Net( NuGet, "Solution Explorer" ) and others have benefited from the learnings of perl
    • JSON was probably at least partially inspired by perl's references syntax. <= My opinion - no supporting material here> Crockford et al were working in a web world where perl CGI was the lingua franca for servers. I am guessing they were knowledgeable about perl. There is too much similarity to be a coincidence (See Rule #39)

    So to wrap up, I see a lot of similarities with node.JS and perl. npm is built on a model started by perl. In some cases, it may legitimately do a better job that CPAN does. I have a lot of things that I wish were done better with CPAN, like aging out very old modules - oops those modules are probably still in production somewhere - or at least giving me a way to hide them or sort by last update date on MetaCPAN. But in the end, perl and CPAN continue to be examples of fundamental goodness that I use almost every day when I am leading software teams and need examples to show the importance of coding for clarity, documentation, test driven development, continuous integration with all of these at scale and lasting over time.

    If you want to use JavaScript on node with npm, knock yourself out. It won't offend me. But if you blindly walk away from perl without a real investigation - like realizing that you are using a 13 year old version - i.e. a version that predates the very existence of node - then you are doing yourself a disservice.

    Enjoy! lbe

A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1213085]
Approved by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found