in reply to Re: cpanm says OK but module not really installed
in thread cpanm says OK but module not really installed

A few minutes later, here is a fix:

1. Move the Astro dir into lib/Astro

2. Update Makefile.PL to get the version from lib/Astro/SpaceElevator.pm

Then run the usual perl Makefile.PL and [dg]?make process.

The fact that there are no tests is something else that could be fixed.

Replies are listed 'Best First'.
Re^3: cpanm says OK but module not really installed
by marto (Cardinal) on Oct 19, 2019 at 17:29 UTC

    Sure this will put things in the right place, but even running the example code from the POD results in an error, while testers lists some 'success', it isn't looking good:

    use Astro::SpaceElevator; my $elevator = Astro::SpaceElevator->new(0, 120, 100_000, time()); print "The elevator leaves the Earth's shadow at " . ($elevator->shado +ws->{Earth}{penumbra})[1] . "km above the base.\n";

    returns

    Too many arguments at /usr/local/share/perl/5.26.1/Astro/SpaceElevator +.pm line 204.
    # first we check to see if the sun has risen over the base station +. my (undef, $elevation, undef) = $base->azel($sun, 1); # line 204
      Digging deeper, Astro::SpaceElevator (from 2007), was broken by deprecation of the two-argument form of azel in Astro::Coord::ECI in 2013 (replaced by azel_offset in 2011).
      0.043           2011-08-29      T. R. Wyant
      
      
      Provide an Astro::Coord::ECI azel_offset() method, which takes, as its
      optional second argument, an offset applied to the elevation, in
      terms of the apparent radius of the body whose position is being
      calculated. The two-argument version of the azel() method is now
      deprecated, and will begin warning in the first release after March
      1 2012.
      
      0.057           2013-07-08      T. R. Wyant
      
      Deprecations:
       
        * The two-argument form of azel() is now fatal.
      
      Too many arguments at /usr/local/share/perl/5.26.1/Astro/SpaceElevator.pm line 204.
      
      # first we check to see if the sun has risen over the base station.
      my (undef, $elevation, undef) = $base->azel($sun, 1); # line 204
      

      azel is a method of Astro::Coords::ECI that only takes one arg (the object $sun). However due to the nature of the code and the extra arg I suspect he meant to call azel_offset, where the "1" refers to the upper limb of the sun, to compute sunrise:

      my (undef, $elevation, undef) = $base->azel_offset($sun, 1); # line 20 +4