Kristis/Max,
We placed this code:
eval { require Bugzilla; 1; } || die $@;
in the Common.pm where the packages are being included. It died, but with no
error. We tried a bunch of different things with it, but still no errors
were printed.
We then tried adding the eval line before the if statement in Common.pm:
1 eval { require Bugzilla; };
2 if ( !eval ( $cmd ) ) {
3 return 0, "";
4 } else {
...
Everything worked, although I was confused for awhile as to why that would
work. I then realized that the line 1 eval uses {} and line 2 uses (). I
took out line 1, changed () to {} in line 2 and NO ERROR!
Fix: change
if ( !eval ( $cmd ) ) {
to
if ( !eval { $cmd } ) {
It was brought to our attention by another perl colleague that the 'eval {}'
handles the argument differently in that when using 'eval ()' the argument
is treated as text. So our 'require Bugzilla' argument bombed since it
treated it as text. Now, when we use '{}' it tells eval to execute the
"require" function and return its result.
We were able to get this working.
Question: How can we tell if SCMBUG is working? Are there test cases we can
run after installing the glue etc?
Thanks for ALL of your help.
John/Teri
From: Kristis Makris <[EMAIL PROTECTED]>
To: John Coffie <[EMAIL PROTECTED]>
CC: [email protected]
Subject: [Fwd: Re: [scmbug-users] Scmbug error 79: Package 'Bugzilla'
notfoundin installation]
Date: Thu, 14 Feb 2008 14:44:51 -0700
Teri, perhaps you can try Max's suggestion ?
-------- Forwarded Message --------
From: Max Kanat-Alexander <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [scmbug-users] Scmbug error 79: Package 'Bugzilla' not
foundin installation
Date: Thu, 14 Feb 2008 12:05:46 -0800
On Thu, 14 Feb 2008 11:34:28 -0700 Kristis Makris
<[EMAIL PROTECTED]> wrote:
> We are experiencing a problem with Scmbug when Scmbug attempts to
> reuse the Bugzilla 3.0.3 API.
First off, I know I'm being nitpicky, but the "Bugzilla API" is
in Bugzilla::WebService. Everything else is just "a bunch of objects
and functions we use inside of Bugzilla."
> Do you know if there are any issues related to have_vers on Solaris?
No, it should work fine, it's all Perl.
What you want to do is have him try, inside whatever code is
failing to load the Bugzilla module:
eval { require Bugzilla; 1; } || die $@;
Which will tell you what the problem is.
-Max
<< signature.asc >>
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users