Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: package Foo; isa Bar; why not?

by Anonymous Monk
on Dec 20, 2003 at 10:37 UTC ( #316026=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: package Foo; isa Bar; why not?
in thread package Foo; isa Bar; why not?

This isn't meant as a criticism, however, why use map in place of grep?

my $caller = caller(); push @{"$caller\::ISA"}, grep $_ ne $caller, @_;

I do use map with the empty return quite often when a list/array requires filtering and transformation because it tends to make me feel warm and fuzzy inside. Multiple maps and greps can become confusing. However, if all you're doing is filtering then grep to be clearer (and I believe faster, too).


Comment on Re: Re: Re: package Foo; isa Bar; why not?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://316026]
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: (10)
As of 2014-12-25 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (162 votes), past polls