Bug#383925: libmail-gnupg-perl: verify method throws error
celejar at gmail.com
Mon Aug 21 19:27:14 UTC 2006
On Mon, 21 Aug 2006 15:22:58 +0200
gregor herrmann <gregor+debian at comodo.priv.at> wrote:
> On Sun, 20 Aug 2006 14:22:38 -0400, celejar wrote:
> > Invoking Mail::GnuPG->verify($entity) with MIME::Entity objects
> > throws this error:
> > Can't use string ("Mail::GnuPG") as a HASH ref while "strict refs" in
> > use at /usr/share/perl5/Mail/GnuPG.pm line 364, <STDIN> line 28.
> > 'GnuPG.pm line' is always '364', '<STDIN> line' varies.
> I cannot reproduce this error at the moment.
> Could you please provide a concrete example how this error can be
> Thanks in advance,
My mistake. I'm a perl (and OOP) novice and didn't realize that the GnuPG methods are object methods rather than class methods and must be invoked on Mail::GnuPG objects. [I was writing 'Mail::GnuPG->verify($entity);' instead of 'my $mg = new Mail::GnuPG; $mg->verify($entity);'. The documentation might be a bit clearer here; other perl documentation, e.g. that of MIME::Parser, explicitly states of each method whether it's an instance or class method.]
Sorry for wasting your time.
ssuds.sourceforge.net - Home of Ssuds and Ssudg, a Simple Sudoku Solver and Generator
More information about the pkg-perl-maintainers