On Thu, 2011-03-10 at 09:28 +0100, Thorsten Schöning wrote: > Guten Tag Marcel Loose, > am Mittwoch, 9. März 2011 um 17:51 schrieben Sie: > > > Now what do we conclude from this? > > Should /usr/share/scmbug/lib/Scmbug/Daemon/Bugzilla.pm be fixed > > accordingly? I.e., should the assignment to $self be put inside a > > BEGIN-block? > > There's no $self in the BEGIN block because those blocks are used at > compile time, but $self is a reference to a blessed object created at > runtime. It's a chicken-egg-problem. What can be done is to write > separate class functions to read the configuration just for this > purpose, read the Bugzilla installation directory and use it with use > lib. We do something similar in our CGI-Scripts: A special file is > read which consists of a list of paths which should be added to @INC > in the BEGIN block during compile time. This works, meaning that you > can read files etc. in the BEGIN block and as you say that the example > works, one can add to @INC using use lib, which we don't at the moment > in our programs. > > What should be done is like the following: > > * create some class function > * read SCMBug configuration > * eval file content > * use lib with Bugzilla installation directory from evaled content, > which is just a hash now > > Mit freundlichen Grüßen, > > Thorsten Schöning >
Hi Thorsten, Definitely sounds like something that should be put in the bug tracker. I guess anyone who will install some Perl modules using Bugzilla's checksetup.pl script will hit this wall. Kristis, you're the only one with write access to the bug tracker, right? Could you create a new bug entry for this? Cheers, Marcel Loose. _______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
