http://qs321.pair.com?node_id=11112821

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

Hello esteemed monks,

This thread is to be seen as a continuation of Using Cartons to automate module installs, where, instead of Cartons, we went with cpanfiles. I worked up a bash command that takes a module list and creates a cpanfile:

$ cat 1.list.cpan |perl -lpe "s{^}{requires '};s{$}{', 'undef';};" >cp +anfile $ cat cpanfile requires 'App::cpanminus', 'undef'; requires 'CPAN', 'undef'; requires 'CPAN::DistnameInfo', 'undef'; requires 'CPAN::Meta::Check', 'undef'; requires 'Log::Log4perl', 'undef'; requires 'Module::Runtime', 'undef'; requires 'PadWalker', 'undef'; requires 'Path::Tiny', 'undef'; requires 'Perl::Tidy', 'undef'; requires 'YAML', 'undef'; $

The outstanding question is how it would go down in the target environment, and I think the answer is "flawlessly:"

$ ./3.cpan_dir.sh mkdir: cannot create directory ‘logs’: File exists /home/gilligan/Documents/Documents/hogan mkdir: cannot create directory ‘cpan_file_dir7’: File exists /home/gilligan/Documents/Documents/hogan/cpan_file_dir7 requires 'App::cpanminus', 'undef'; requires 'CPAN', 'undef'; requires 'CPAN::DistnameInfo', 'undef'; requires 'CPAN::Meta::Check', 'undef'; requires 'Log::Log4perl', 'undef'; requires 'Module::Runtime', 'undef'; requires 'PadWalker', 'undef'; requires 'Path::Tiny', 'undef'; requires 'Perl::Tidy', 'undef'; requires 'YAML', 'undef'; [sudo] password for gilligan: --> Working on . Configuring /home/gilligan/Documents/Documents/hogan/cpan_file_dir7 .. +. OK ==> Found dependencies: Perl::Tidy, YAML, Path::Tiny, Log::Log4perl, C +PAN::DistnameInfo, CPAN::Meta::Check --> Working on Perl::Tidy Fetching http://www.cpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-202001 +10.tar.gz ... OK ... Successfully installed CPAN-Meta-Check-0.014 <== Installed dependencies for .. Finishing. 11 distributions installed behold your output: App::cpanminus CPAN::DistnameInfo CPAN::Meta::Check Log::Log4perl Path::Tiny Perl Perl::Tidy Spiffy Test::Base Test::Deep Test::YAML Text::Diff YAML duration=298 Tue Feb 11 12:37:58 PST 2020 $

The "output" here is a bash wrapper around this:

#!/usr/bin/perl -w use 5.016; use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @modules = $inst->modules(); foreach my $module (@modules){ print $module . "\n"; } __END__

The modules I put in this list are ones I consider essential to having a usable perl capability. I might install them as a vanguard.

Q1) What might you add to a list of useful modules to have from the git-go? For example, what might be a good cpanfile to have to deal with universal time?

I would like to take this discussion in a different direction than usual, and I hope not to hit a third rail. As a person who has only used his computer skills "under the table," that is, in the cash economy for small gigs, I'm wondering what the job title is of a person who gets paid over the table to configure and maintain work stations for others in a company. Is it a systems administrator or a network adminstrator? Q2) Do you happen to be such a person who has had or is currently in such a post?

Q3) (Here's the one I'm really fishing for) What certifications does one need to be considered for such a post? I have an opportunity to get some continuing education, but I need to be specific about things I hope to achieve.

I hope the questions aren't too Ami-centric. Heck, let me also ask, Q4) Are these certifications the same around the world?

Thanks for your comment,

Replies are listed 'Best First'.
Re: scripting a perl install on *nix, including making the workstation usable
by choroba (Cardinal) on Feb 11, 2020 at 22:13 UTC
    I'm not sure about other countries or companies, but at least at the last two positions I've worked in and participated in the hiring process, we've never paid any attention to certifications of any kind. We've had a rather complex interview process, though, with people from various departments asking questions in several sessions, both remote and on-site. I live in the Czech Republic, but both the companies had headquarters in the US, $job - 1 being a large global financial institution, and $job being a start-up coming into its teens.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: scripting a perl install on *nix, including making the workstation usable
by afoken (Chancellor) on Feb 12, 2020 at 06:09 UTC
    What certifications does one need

    On collecting certificates: Re: Perl Passion website

    You can have a certificate as professional research diver, lack any experience in developing software except for knowing how to switch on a PC, and still get hired to develop medical software: See "you are too academic" in "Your code sucks".

    You can list decades of experience in developing hard- and software and still suck at reading and understanding requirements: See "impedance mismatch" in "Your code sucks".

    A two decades old piece of paper hanging in a dark corner at my home office wall qualifies me as Diplom-Informatiker (so I'm a graduate computer scientist). Theoretically, I studied computer networking, but practically it was all about software. I got that piece of paper for developing a project management software, and I've been working for that two decades as a professional software developer. BUT: I also do system and network administration, not because I was formally qualified, but because it can be fun and in a team of software developers, I'm often the one knowing most about networks. See Re^3: Working Solo and in a Team.

    Are these certifications the same around the world?

    No, but more and more countries more or less copy good and a lot of bad ideas from the US. The European Union has its own sets of standards and certifications, mostly for products, but also for people's qualification. We are still trying to get things more unified, but getting nearly 30 countries to agree on standards is a slow and tedious process.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      ... getting nearly 30 countries to agree on standards is a slow and tedious process.

      And even if agreement is reached, there's no guarantee it's about anything sane. :)


      Give a man a fish:  <%-{-{-{-<

        And even if agreement is reached, there's no guarantee it's about anything sane. :)

        My view: It’s guaranteed it will not be anywhere near optimal. Design by committee and all that jazz.

      A two decades old piece of paper hanging in a dark corner at my home office wall qualifies me as Diplom-Informatiker (so I'm a graduate computer scientist). Theoretically, I studied computer networking, but practically it was all about software. I got that piece of paper for developing a project management software, and I've been working for that two decades as a professional software developer. BUT: I also do system and network administration, not because I was formally qualified, but because it can be fun and in a team of software developers, I'm often the one knowing most about networks. See Re^3: Working Solo and in a Team.

      Thanks for your general yet personal comments that did hit the thrust of my questions, Alvin. I found the linked reading also worthwhile. Since I don't get a chance to thank you for your prolific writings on the net on perl syntax as I consult them, let me tell you how worthwhile they are to me as a person who sits outside of such organizations. I understand your injunction in Re: Perl Passion website. Since I refer to you and it in fixing Log::Log4perl was Re: Petty janitor post vandalism, I might direct your attention there as well.

      I would like to continue with some more code and output from the install that I initially described as "flawless." (ahem) It turns out that supplying the value 'undef' as the second parameter in a require statement leaves room for improvement.

      I've been looking at the output of varying commands, for example this one:

      $ cpan -D Moose CPAN: Storable loaded ok (v2.62) Reading '/home/gilligan/.cpan/Metadata' Database was generated on Wed, 12 Feb 2020 20:41:03 GMT Moose ---------------------------------------------------------------------- +--- (no description) E/ET/ETHER/Moose-2.2012.tar.gz /usr/lib/x86_64-linux-gnu/perl5/5.26/Moose.pm Installed: 2.2009 CPAN: 2.2012 Not up to date Karen Etheridge (ETHER) ether@cpan.org $

      'Moose' was not on the list of modules to install, but I have it. Apparently, I didn't get the latest CPAN on this, and that would qualify as the "better thing" in this case.

      Q5) Is there a way to ask for a version number such that it is the highest?

      Q6) Do these warnings not make it seem like ExtUtils::MakeMaker needs an update?

      $ cpan -l | grep cpanminus Use of uninitialized value $ExtUtils::MakeMaker::_version::CVSVERSION +in pattern match (m//) at (eval 213) line 7, <FILE> line 19. Use of uninitialized value $ExtUtils::MakeMaker::_version::CVSVERSION +in pattern match (m//) at (eval 214) line 7, <FILE> line 19. Use of uninitialized value $ExtUtils::MakeMaker::_version::CVSVERSION +in pattern match (m//) at (eval 215) line 7, <FILE> line 17. App::cpanminus 1.7044

      I have been trying to determine what commands I have to add sudo to, where and how. Since I'm not going with a local::lib, I believe I need elevated privileges, which I typically prepend to a command. I'm going to list a bash script that shows an attempted perl module install, not because I want to force "the topic" to bash, but because I want to get away from this wrapper and do the whole thing in perl.

      #!/bin/bash # # # keep a log named by time stamp export PATH=:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/ +bin set -u app=${0##*/} mkdir "mod_lists" pathto=mod_lists timename=$(date +"%m-%d-%Y_%H-%M-%S") out=$HOME/Documents/Documents/hogan/$pathto/$timename.log if [ 1 -eq 1 ] ; then echo "basename dollar sign zero is" $app echo "path is" $pathto echo "Munged time is" $timename echo "out fn is $out" echo "Time is $timename " > "$out" fi # end if [ 1 -eq 0 ] declare -ir SUCCESS=0 declare -ir E_FATAL=1 pwd | tee -a "$out" echo "installing useful packages:" | tee -a "$out" sudo perl -MCPAN -e 'install Bundle::CPAN' | tee -a "$out" ./1.mod.pl | tee -a "$out" echo "end of output" | tee -a "$out" gedit $out & read -n 1 echo "duration=$SECONDS" | tee -a "$out" date | tee -a "$out" exit $SUCCESS

      The main purpose of the script is to create a file that will log what happens on the terminal through the use of the | tee -a "$out". It creates a file based on a munged form of the time. Also, it houses the commands I'm testing:

      sudo perl -MCPAN -e 'install Bundle::CPAN' | tee -a "$out"

      This did not result in this module being installed. I don't know if the problem is with the command or whether my install doesn't have the proper headers yet. Usually, I have to "feel my way through it," which seems more to imitate a blind guy tapping things with his cane till he figures out their shape.

      Q7) Can I not recast this script using Log::Log4perl, this module that has come to my attention recently as a sticky wicket?

      Q8) Does one imitate Tatsuhiko Miyagawa's command to acquire App::cpanminus?

      curl -L https://cpanmin.us | perl - --sudo App::cpanminus

      Thanks all for comments,