Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: cpanm says OK but module not really installed

by swl (Parson)
on Oct 19, 2019 at 09:32 UTC ( [id://11107690]=note: print w/replies, xml ) Need Help??


in reply to cpanm says OK but module not really installed

This is an odd one. I just installed it using Strawberry 5.28.0 under berrybrew, and there is no file called SpaceElevator.pm that is installed.

Checking the blib dir when using cpanm --look:

cpanm --look Astro::SpaceElevator gmake

and then run under bash for windows from the build dir:

find blib -print blib blib/arch blib/arch/.exists blib/arch/auto blib/arch/auto/Astro blib/arch/auto/Astro/SpaceElevator blib/arch/auto/Astro/SpaceElevator/.exists blib/bin blib/bin/.exists blib/lib blib/lib/Astro blib/lib/Astro/.exists blib/lib/auto blib/lib/auto/Astro blib/lib/auto/Astro/SpaceElevator blib/lib/auto/Astro/SpaceElevator/.exists blib/man1 blib/man1/.exists blib/man3 blib/man3/.exists blib/script blib/script/.exists

There is nothing obvious in the Makefile.PL that comes with the distro, so perhaps others can shed some light?

(Minor edit - fix newline that snuck into the find command line)

Replies are listed 'Best First'.
Re^2: cpanm says OK but module not really installed
by swl (Parson) on Oct 19, 2019 at 09:46 UTC

    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.

      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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-29 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found