andand

Is there a Javascript equivalent of Ruby's andand?

In trying to make my Javascript unobtrusive, I'm using onLoads to add functionality to <input>s and such. With Dojo, this looks something like: var coolInput = dojo.byId('cool_input'); if(coolInput) { dojo.addOnLoad(function() { coolInput.onkeyup = function() { ... }; }); } Or, approximately equivalently: dojo.addOnLoad(func...

Is there an andand for Perl?

I'd rather do this: say $shop->ShopperDueDate->andand->day_name(); vs. this: say $shop->ShopperDueDate->day_name() if $shop->ShopperDueDate; Any ideas? (This idea is inspired by the Ruby andand extension.) (Actually it is inspired by the Groovy language, but most people don't know that ;-) update: I think that both maybe() and e...

Avoid object_id warning when using andand in Ruby 1.9?

When I load andand in Ruby 1.9 I get the warning andand.rb:111: warning: undefining 'object_id' may cause serious problem Does anyone know a way, other than modifying andand to not remove object_id, to avoid this warning? Thanks! ...