I always use prototypes -- even on methods where they
don't matter -- for no other reason than, minimally,
documentation. It's a self-imposed discipline.
in reply to Re^5: How to return values from a hash?
in thread How to return values from a hash?
By looking at that most perl programmers would know that it takes 3 mandatory vars, and an optional 4th; I don't ascribe to the 'no prototypes propaganda', but then I also know their limitations.
2. answered above where someone asked how _var got called. I needed a way to pass params, from the
'goto' to this... $_ is the only way I know.
3. always. (else prototypes are even more worthless).
the Data::Var module defines fields with optional default definitions -- so if you access them through the access routines (which I don't on more speed sensitive areas), you will get a compile time error for trying to access a field that doesn't exist.