"Oleg V. Volkov" <[EMAIL PROTECTED]> wrote:
[skip]
> but declaring
> parameters two times - first as "our" variables and then once again
> as a list for this function to check against, so it can catch
> errors in list looks kinda ineffective to me.
Seems like I've found something that will help me
"Oleg V. Volkov" <[EMAIL PROTECTED]> wrote:
[skip]
> Speaking of globals, AFAIK, I have virtually no drawbacks
> against "my", as long as I use "our" variables inside
> the scope. So what's bad there in using "our"?
After some thinking I've found a scenario where Alias::attr
use of globals can giv
"Dr.Ruud" <[EMAIL PROTECTED]> wrote:
>> Alias::attr (and, as far as I understand all other
>> modules that perform namespace/glob tricks) operate
>> exclusively on globals.
> Did you check Data::Alias too?
Really nice, but, alas, no Win32 and that's where I run most
of my stuff. It also wouldn be
"Oleg V. Volkov" schreef:
> Alias::attr (and, as far as I understand all other
> modules that perform namespace/glob tricks) operate
> exclusively on globals.
Did you check Data::Alias too?
>From the examples:
alias my $fi = $self->{FrobnitzIndex};
This works a bit like
for my $fi ($sel
"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, $ru
From: "Oleg V. Volkov" <[EMAIL PROTECTED]>
> "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);
Please DON'T!
You DO want to use
my ($log
"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 "A
> ""Oleg" == "Oleg V Volkov" <[EMAIL PROTECTED]> writes:
"Oleg> I'm using a simple Getopt::* / Alias::attr like function to parse
"Oleg> named parameters from hash and assign them to localized variables
"Oleg> to save me some dereferencing inside heavy loops, but declaring
"Oleg> parameters tw
"Oleg V. Volkov" schreef:
> Is there a way to do something to effect of:
> our ${$varname};
>
> I'm using a simple Getopt::* / Alias::attr like function to parse
> named parameters from hash and assign them to localized variables
> to save me some dereferencing inside heavy loops, but declaring
>
"Jenda Krynicky" <[EMAIL PROTECTED]> wrote:
>> Is there a way to do something to effect of:
>> our ${$varname};
[skip]
> Have a look at
>use vars qw($list @of %variables);
[skip]
> I don't think you can emulate 'local' or 'my'. You should also be aware of
> the different scoping of the 'o
From: "Oleg V. Volkov" <[EMAIL PROTECTED]>
> Greetings.
>
> Is there a way to do something to effect of:
> our ${$varname};
>
> I'm using a simple Getopt::* / Alias::attr like function to parse
> named parameters from hash and assign them to localized variables to
> save me some dereferencing ins
11 matches
Mail list logo