On Tue Jul 03 07:59:12 2012, SBECK wrote:
Show quoted text> I have no problems applying this patch... though shouldn't the line be:
>
> eval "require $backend; $backend->import() or die $!; return 1;"
>
> (note the added semicolon after the die)?
Lol, yes there should be a semicolon there. Though interestingly enough it's not required. Eval doesn't have to succeed. That whole `return 1` is
rather silly. Evals return value doesn't matter at all -- only whether or not an exception was thrown.
Show quoted text> Also, I'm not very familiar with the concept of factories. Is there a
> fairly simple set of steps that I can do to reproduce this? I'd like to
> understand the failure a bit more.
The failure comes from the use statement for YAML::Syck existing ONLY in the class you're requiring and not in the factory. If YAML::Syck isn't
installed then the `require` throws an exception. Because the call to require is guarded in an eval though, that exception goes unnoticed. The
program then continues to attempt to execute without ever having made it to the $backend->import() (the call to require threw an exception).
This problem would only exist if you tried to play with the module without running the dependency-check on the Makefile.PL -- that was my own
mistake.
--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com