"Jenda Krynicky" <[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);
> Please DON'T!
> You DO want to use
>        my ($login, $type_id, $account_id, $ap_id, $rule);

No. While I do want to use my, I, unfortunately, have to use globals,
because Alias::attr (and, as far as I understand all other
modules that perform namespace/glob tricks) operate exclusively
on globals.

> Maybe there are already modules that will do what you want and more. 
> And safer. Have a look at 
> Go to http://search.cpan.org/ and see
> Params::Named, Sub::Parameters, Sub::Signatures, Params::Smart, 
> Perl6::Parameters, Sub::Parameters, ... 

Though I didn't check entire list yet, I've seen some of them before
and they're either source filters or just expand arguments in some
kind of hash, which doesn't give me benefit of one-time dereference
that I get with aliasing arguments to variables either manually
or with Alias::attr, and this speed gain is the thing that I need
in functions with long loops.

-- 
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