On Fri, 2 Jul 2004, Mark Powell wrote:
> They are using variables of the form $self->{_global} and also using
> $self->qp->connection->notes('global', $value), etc. It seems the former
> which is basically a hash would be more efficient? If so, why does the
> latter exist?
Ahh, posting without reading the source :(
I see that notes() just puts the value into a multi-dimensional hash.
sub notes {
my $self = shift;
my $key = shift;
@_ and $self->{_notes}->{$key} = shift;
#warn Data::Dumper->Dump([\$self->{_notes}], [qw(notes)]);
$self->{_notes}->{$key};
}
It seems that notes() doesn't gain you much over using a variable directly
or am I missing something?
> Also, when using the former do the hash names have to be unique between
> plugins?
Do they?
Cheers.
> I'm still unclear on all this, as you can tell :(
> Any thoughts would be appreciated.
> Cheers.
>
> --
> Mark Powell - UNIX System Administrator - The University of Salford
> Information Services Division, Clifford Whitworth Building,
> Salford University, Manchester, M5 4WT, UK.
> Tel: +44 161 295 4837 Fax: +44 161 295 5888 www.pgp.com for PGP key
>
--
Mark Powell - UNIX System Administrator - The University of Salford
Information Services Division, Clifford Whitworth Building,
Salford University, Manchester, M5 4WT, UK.
Tel: +44 161 295 4837 Fax: +44 161 295 5888 www.pgp.com for PGP key