Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: help with "symbol lookup error" message

by syphilis (Archbishop)
on Jan 27, 2023 at 12:11 UTC ( [id://11149926]=note: print w/replies, xml ) Need Help??


in reply to Re^2: help with "symbol lookup error" message
in thread help with "symbol lookup error" message

So List::Util is in there on my platform right enough

Aaah ... cool.
AFAICS, this absurd dependency is not present in perl-5.36.0 - on both Windows and freebsd-12.0.
On Windows (perl-5.36.0), your script outputs:
Loading File/Copy.pm Loading builtin.pm Loading overload.pm Loading overloading.pm Loading warnings/register.pm Loading File/Spec.pm Loading File/Spec/Win32.pm Loading Cwd.pm Loading Exporter.pm Loading XSLoader.pm Loading File/Spec/Unix.pm Loading constant.pm Loading Config.pm Loading Time/HiRes.pm Loading Carp.pm
On freebsd (5.36.0), it's exactly the same - except that Carp.pm and File/Spec/Win32.pm are not loaded, and Exporter/Heavy.pm is loaded.

I'm sure there's a module for this but I can neither remember nor find it just now

I reckon the code you posted is much clearer for not having loaded that module (whatever it is ;-)

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: help with "symbol lookup error" message
by hippo (Bishop) on Jan 27, 2023 at 12:39 UTC

    Thanks for providing your list. I've dug a little further and for me the chain to List::Util appears to be just File::Copy -> Scalar::Util -> List::Util with File::Copy having this line:

    my $Scalar_Util_loaded = eval q{ require Scalar::Util; require overloa +d; 1 };

    This explains why I'm seeing it but not why it is absent in your case. I'll leave that part to you. :-)


    🦛

      This explains why I'm seeing it but not why it is absent in your case. I'll leave that part to you. :-)

      Heh ... yeah, fair enough ;-)
      AFAICT it's pretty simple. By the time perl-5.36.0 comes along, Sawyer has removed the Scalar::Util requirement from File/Copy.pm.

      Frid'y night (alcohol-fuelled) aside: Given the ease with which perl can be built & installed, and that perl-5.38.0 is only a few months away, I'm surprised that serious perl-users are still running perl-5.34.x.
      I see it as being symptomatic of the mentality expressed poignantly by Frank Zappa in "A Token of My Extreme" (Joe's Garage):
      Some people think that if they go too far, they'll never get back to w +here the rest of them are.
      Cheers,
      Rob
        Given the ease with which perl can be built & installed

        Built, yes. Installed, yes. Tested against all code using that version in production, not so much. I'm very happy to stick with 5.34.0 for the stability. A couple of years ago (ie. 2 major migrations back) it was 5.16 so these are halcyon days indeed.

        All that said, I feel a poll coming on ...

        Update: there it is.


        🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found