Yo yo yo yo yo!
I have a config module with all sorts of nice variables and hashes and arrays. Now, we've created a way to override stuff in the default config module by eval'ing a file that can contain some of the same variables in the config module. This file is evaled at the top of the module and everything below looks like this:$foo ||= 'something default and generic"; $bar ||= 'something else common place and a good guess';
This works fine and dandy until I hit a hash or an array, and then I get a polite error, such as:
Can't modify array dereference in logical or assignment (||=)
Which just makes me all frowny. Is there an easy way to have the same sort of functionality that I have with ||= and variables for hashes and arrays? I understand that ||= may work differently within a list context, but I don't know what to use in its place.
thanks for the wisdom,
-justin simoni
!skazat!
In reply to = for lists and hashes? by skazat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |