kikuchiyo has asked for the wisdom of the Perl Monks concerning the following question:
I had the occasion to look at the source of Net::HTTP::Methods (to debug a nasty, intermittent read timeout, but that's a different story), and I saw that it defines itself like this:
my $self = bless Symbol::gensym(), $class;
And then it has to access its attributes like this:
${*$self}{'http_buf'} = "";
What is the point of this? Does this technique have any advantages over the usual blessed hashref?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: glob objects - why?
by ikegami (Patriarch) on Feb 24, 2023 at 06:23 UTC | |
|
Re: glob objects - why?
by LanX (Saint) on Feb 24, 2023 at 10:56 UTC | |
|
Re: glob objects - why?
by choroba (Cardinal) on Feb 23, 2023 at 23:47 UTC | |
by NERDVANA (Priest) on Feb 24, 2023 at 07:00 UTC | |
by choroba (Cardinal) on Feb 24, 2023 at 08:48 UTC | |
by Aldebaran (Curate) on Feb 25, 2023 at 21:46 UTC | |
by hv (Prior) on Feb 25, 2023 at 22:49 UTC |