my problem is that i have to use hash as a standard interface for communication with some methods, but sometimes my method just checks if something is declared (like a flag) or not (it doesn't have to be initialized (it could but it doesn't have to be))
so my question is how can i make my method understand if i write :
any suggestions ?$self->test('database'); and $self->test(database => 'name.db'); sub test { my ($self,---) = @_; my %arg = ---- if (--- eq 'HASH'); this obviously doesn't work, but how to make it work !!! } $self->test(database => 'T'); is something i would like to avoid
thnx
In reply to hash interface by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |