Subject: | 2/10 client.t Subtests Failing on Install |
Hi,
So I'm running into a bit of a problem when I go to install the CPAN
Purple module. I kind of skipped the whole 'learning Perl' thing because
I decided it was a dead language, haha, but lo and behold, I really
needed to make a plugin for my Pidgin IM client quickly, so I had to
work my way through this.
I ended up figuring out the issue (the test, rather than the actual
library, had the bug) and all my logs, the patch as well as my
environment information is attached.
What appears to have been the problem is that on line 20, client.t
instantiates a Purple::Server::REST instance. This instance possesses an
instance variable named 'server' which is assigned the result of a call
to the constructor Purple, which by default returns a new Purple::SQLite
instance.
This Purple::SQLite needs and uses a purple.db SQLite database file
which it creates on instantiation. However, line 28 of client.t almost
immediately thereafter deletes this file.
client.t then, for the first iteration of its foreach loop, Calls
methods on an instance of Purple::Client, which connects over HTTP to
the Purple::Server::Rest instance, and at that point the latter attempts
to utilize it's Purple::SQLite instance variable. This results in an I/O
error (and thus causes the test to fail) however, because Purple::SQLite
can quite understandably not function properly sans its datastore.
Conversely, at the start of the SECOND and final iteration of the
client.t foreach loop, the 'purple.db' SQLite DB file *does* need to be
unlinked. This is because in this iteration, the $client variable is a
Purple::SQLite and the database abstraction module is operated on
directly rather than via an HTTP as before that utilized
Purple::Server::REST and Purple::Client.
Please let me know if you have any questions/issues or if there's any
way I can help further.
I've marked the severity as important because the bug seems to currently
cause unforced install attempts to always fail, resulting in the module
not being placed in Perl's library search locations, thus preventing
any/all use and leading the user to think the module might not work
correctly if the test results are ignored.
Best,
Mike