"Dr.Ruud" <[EMAIL PROTECTED]> wrote:
> Provide code, so we can guess better.

Here's example how I use it in functions:

sub add_service{
 our($login, $type_id, $account_id, $ap_id, $rule);
 # Here we do some universal sanity checks for all add_* functions
 attr({ croak_wrong_args(@_) });
 print "Adding service type $type_id...\n";
 # Here we do actual work
 # ...
}

In this function I also would like to add croaking on passing
hash with keys that do not used in this function, but in this
solution this would require manually adding list of used/allowed
keys to call to sanitizing function, copying "our" declaration.

That's why I need to either find some way to stack "our" and
"croak_wrong_args" together, way to give "our" variable names
from list, so I can pass same list to "our" and to sanitizer
or to declare our variables one stack frame higher (which I
think is even less possible than first two).

-- 
Oleg "Rowaa[SR13]" V. Volkov

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to