Thread Hash als Option missbrauchen (118 answers)
Opened by bloonix at 2005-12-19 02:24

bloonix
 2005-12-19 06:33
#60969 #60969
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
wie kann ich denn sicherstellen, dass mir ein Hash und keine Referenz
übergeben wird?

Code: (dl )
die 'bad ...' if ref @_ eq 'HASH';


das klappt irgendwie nicht ...

ich könnte zwar mit

Code: (dl )
die 'bad ...' if ref $_[0] eq 'HASH';


prüfen, aber geht das nicht einfacher?
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread Hash als Option missbrauchen