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

So, I installed Module::Starter from cpan (I did a sudo cpan, then force install Module::Starter)

BUT, if I try to run it from bash I get :

>> -bash: module-starter: command not found

    I've tried:
  1. Close/Reopen bash
  2. Install from cpan again, cpan says it is already installed. Also tried force install.
Any ideas? Thanks so much

Replies are listed 'Best First'.
Re: module-starter command not found after installation
by CountZero (Bishop) on Dec 02, 2012 at 07:35 UTC
    Why did you have to force install this module? Did you get any erors during install?


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
      Nope. I got all tests successful I did get: 'YAML' not installed, will not store persistent state
        That means that you need to install a YAML module or a JSON module. CPAN will let you choose which module that you want. I've had problems with YAML, so I always choose YAML::Syck. So, sudo to cpan, then
        cpan> install YAML::Syck cpan> o conf init yaml_module #choose YAML::Syck cpan> o conf commit
Re: module-starter command not found after installation
by aitap (Curate) on Dec 02, 2012 at 10:50 UTC

    Exactly where did CPAN install this module? Try perldoc perllocal to find this out.

    Perhaps CPAN has automatically set up a local::lib overlay in the home directory of the user who ran CPAN (i.e. root) and thus made installed modules unavalable for other users.

    Sorry if my advice was wrong.

      Hey Maybe you're on to something

      I got this:

      Wed Nov 28 20:17:48 2012: "Module" Test::Simple
                "installed into: /opt/local/lib/perl5/5.12.4"
                "LINKTYPE: dynamic"
                "VERSION: 0.98"
                "EXE_FILES: "
         Wed Nov 28 20:18:06 2012: "Module" HTTP::Tiny
                "installed into: /opt/local/lib/perl5/site_perl/5.12.4"
                "LINKTYPE: dynamic"
                "VERSION: 0.024"
                "EXE_FILES: "
         Wed Nov 28 20:18:12 2012: "Module" IPC::Run3
                "installed into: /opt/local/lib/perl5/site_perl/5.12.4"

      Also, I can see a number of modules under /Library/Perl/5.10 and /Library/Perl/5.12, but I can't see Module::Starter here

      And It seems that all my newer module installations are going somewhere wrong! How do I make them go back to the regular default location?

      I checked somewhere, can I safely do this:

      eval $(perl -Mlocal::lib=--deactivate-all)

        This command will just unset some environment variables and restore PATH in your current shell. You need to edit your shell rc file (usually ~/.bashrc, check root's too) to reset changes local::lib made. You may also need to edit CPAN config, try grep -r perl5 ~/.cpan (maybe as root) to check whether you need to do it.

        You can also install modules as normal user (to ~/perl5) if you allow local::lib to create the overlay.

        Sorry if my advice was wrong.