Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

G'day Lady Aleena,

What you have installed locally ("from the command line") indicates Perl 5.24.1; however, whatever your ISP, or equivalent, has installed ("from the browser") indicates Perl 5.8.8.

As far as I know, the core List::Util module has never had the uniq function. Here's the online perldoc for the nearest versions I could find: List::Util (Perl 5.8.8 core) and List::Util (Perl 5.24.0 core) — note the absence of the uniq function in both of those.

When you install List::Util from CPAN, you're actually getting a bundle of modules. At the top of List::Util (CPAN) you'll see the link to the Scalar-List-Utils-1.47 distribution. Follow that to see the modules and other files; one of those is README which contains:

This distribution is a replacement for the builtin distribution.

This package contains a selection of subroutines that people have expressed would be nice to have in the perl core, but the usage would not really be high enough to warrant the use of a keyword, and the size so small such that being individual extensions would be wasteful.

The module which originally had (as best as I remember) the uniq function is List::MoreUtils. Rather than trying to manipulate @INC, you might be better off changing

use List::Util qw{uniq};

to

use List::MoreUtils qw{uniq};

Of course, that would require your ISP (or equivalent) to have List::MoreUtils installed.

"So I installed it in my user directory, and it is version 1.47. However, I am getting an error that uniq is not exported by List::Util."

It's possible I've missed the point there somewhere; in case I haven't, I'll just point out that modules added to the 5.24.1 installation will not make them available to the 5.8.8 installation.

— Ken


In reply to Re: System vs. User module version of List::Util by kcott
in thread System vs. User module version of List::Util by Lady_Aleena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found