Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: List::MoreUtils and require

by leriksen (Curate)
on Jun 28, 2006 at 02:43 UTC ( #557911=note: print w/replies, xml ) Need Help??

in reply to Re: List::MoreUtils and require
in thread List::MoreUtils and require

Could you also call import() after the require as a workaround ?
require List::MoreUtils; List::MoreUtils::import(); # or List::MoreUtils->import() ?

...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann

Replies are listed 'Best First'.
Re^3: List::MoreUtils and require
by Sidhekin (Priest) on Jun 28, 2006 at 02:56 UTC

    Could you also call import() after the require as a workaround ?

    Not as such, since import just aliases the symbols in your own namespace. Doing that at runtime means it is too late to get the prototype checking. But ... ouch ... you could use that as a way to implicitly bypass prototype checking:

    List::MoreUtils->import('each_array'); my $ea = each_array(\@v1, \@v2);

    I prefer being explicit when bypassing prototype checking though -- the flip side to not using that '&' sigil unless you mean it, is to make sure you do use it when you finally do mean it!

    print "Just another Perl ${\(trickster and hacker)},"
    The Sidhekin proves Sidhe did it!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://557911]
LanX leaves with a song of the Chjuman League
[ambrus]: LanX: that's funny because it's actually the upper class that sleep in hotels, so they're the ones who should know how it's pronounced
[LanX]: h is mute in French (and most other romanic languages)
[LanX]: https://en. oxforddictionaries .com/explore/words -with-silent-h
[LanX]: it's 'orrible zis langage...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2017-03-27 17:31 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (321 votes). Check out past polls.