Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

I'm no good at obfu... or am I?

by Anonymous Monk
on Nov 29, 2007 at 17:23 UTC ( [id://653922]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Who wants to design a better SNMP API?
in thread RFC: Who wants to design a better SNMP API?

Posting anonymously so people don't think I'm begging for XP

Just for fun, Here's what the above code would look like if I eliminated all the temporary variables...
my $snmp1 = $sess->gettable( adMX2820M13StatDS3Table, columns => ['adMX2820M13PrvCardPairID',], ); my $snmp2 = $sess->gettable( adGenPortSlotMapTable, columns => ['adGenSlotAddress',], ); my $snmp3 = $sess->gettable( adMX2820M13PrvSlotTable, columns => ['adMX2820M13NetFuncServState',], ); # wheeeeee! my $result = extract_value( match_by_value( $snmp3, sub { $_ in( extract_index_val( 0, match_by_value( $snmp2, sub { $_ in( extract_index_val( 0, and( match_by_value( $snmp1, sub { $_ !~ /not in use/i } ), match_by_value( $snmp1, sub { $_ != '' } ) ) ) ) } ) ) ) } ) );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-24 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found