Subject: | Possible Eval needed |
Date: | Thu, 22 Jan 2009 12:18:10 -0800 |
To: | "bug-Crypt-Simple [...] rt.cpan.org" <bug-Crypt-Simple [...] rt.cpan.org> |
From: | "McGaughey, Link" <linkm [...] qualcomm.com> |
Greetings,
I've been using the EPIC plugin for Eclipse for quite sometime now, and I've seen various issues with it having odd errors. This one error however I could not shake. After digging a bit I found that the method 'get_key_param' in Crypt::Simple is using the 'can' method. This returns a sub reference.
On this line:
if (my $m = $class->can("key_from_$k")) {
The usage of $m happens here:
$key = $class->$m($p{$k})
Because this is a reference I suppose that something somewhere is getting confused (possibly with EPIC). What I've done on my end to make the error subside is to wrap the problem line with an 'eval' like so:
eval {
$key = $class->$m($p{$k})
}
I'm not sure if there is a better way to get rid of this issue or not, but this makes my editor stop complaining. It is entirely up to you as to whether a change is needed here because it seems to work either way. Just thought I would let you know.
mfG
-Link