Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: cpanm says OK but module not really installed

by marto (Archbishop)
on Oct 19, 2019 at 17:29 UTC ( #11107707=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: cpanm says OK but module not really installed
by Anonymous Monk on Oct 19, 2019 at 19:10 UTC
    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.
    
Re^4: cpanm says OK but module not really installed
by Anonymous Monk on Oct 19, 2019 at 18:58 UTC
    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
Node Status?
node history
Node Type: note [id://11107707]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2019-12-06 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (157 votes). Check out past polls.

    Notices?