in reply to GLOB reference problem
The contents of %{...} are expected to be a reference and instead you have a glob.
Two changes I would make to the above code
- Presumably FTP->new is returning an object reference, not a list, so my($this) should probably be simply my $this.
- Assuming $this is an object reference and the object is implemented as a hash, %{*$this} should be simply %{$this} or even just %$this. See perlreftut for further information.
However, it is generally not good programming practice to break the opacity of an object reference. I would look more carefully at the docs for the FTP module and rewrite the code so that the hash assignment is unnecessary.
Best, beth
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: GLOB reference problem
by jerryhone (Sexton) on Oct 05, 2009 at 10:26 UTC | |
by ELISHEVA (Prior) on Oct 05, 2009 at 10:53 UTC | |
by jerryhone (Sexton) on Oct 05, 2009 at 11:12 UTC | |
by almut (Canon) on Oct 05, 2009 at 12:30 UTC | |
by ELISHEVA (Prior) on Oct 05, 2009 at 11:59 UTC | |
Re^2: GLOB reference problem
by ikegami (Patriarch) on Oct 05, 2009 at 14:45 UTC |
In Section
Seekers of Perl Wisdom