Why don't you first test something simpler to see if Bugzilla libraries are
resolved successfully? E.g.:

use warnings;
use strict;

my $installation_directory = "/your/bugzilla-root";

chdir( "$installation_directory" );

## Option 1 - "use lib"
#use lib "/your/bugzilla-root/lib";
#use lib "/your/bugzilla-root";

## Option 2 - "unshift @INC"
unshift @INC, $installation_directory . "/lib";
unshift @INC, $installation_directory;

eval "use Bugzilla";

sub print_bugzilla_statuses
{
        my $status_values = Bugzilla::Field::get_legal_field_values(
'bug_status' );

        foreach my $status ( @$status_values )
        {
                my $is_open = Bugzilla::Bug::is_open_state( $status );
                print( "status = $status, is_open = $is_open\n" );
        }
}


print_bugzilla_statuses();

print( "end\n" );


Regards,
Yavor


On Tue, Mar 8, 2011 at 14:37, Marcel Loose <[email protected]> wrote:

> On Mon, 2011-03-07 at 19:00 +0100, Thorsten Schöning wrote:
> > Guten Tag Marcel Loose,
> > am Montag, 7. März 2011 um 18:14 schrieben Sie:
> >
> > > It does. See my mail from earlier today (10h13) in which I provided the
> > > output of both @INC and $self. However, I think Cwd::getcwd() will give
> > > you the current working directory, and that's not what you're after.
> >
> > The following is one line above the alternative and looks like the
> > current working directory is set, therefore I tried to use it, if
> > $self won#t work for some reason.
> >
> > chdir $self->installation_directory();
> >
> > Mit freundlichen Grüßen,
> >
> > Thorsten Schöning
> >
>
> Hi Thorsten,
>
> If I recap:
>
>      * @INC does get set correctly (see my yesterday's mail from
>        10:13), even in the untouched Scmbug 0.26.22 code.
>      * None of the changes you suggest seem to work.
>
> That leaves the one solution the Kristis doesn't like:
>
>      * set environment variable PERL5LIB in scmbug-server
>
> I guess this problem should be investigated further and maybe an issue
> should be opened for this in the Bug tracker. What do you think?
>
> Cheers,
> Marcel.
>
>
> _______________________________________________
> scmbug-users mailing list
> [email protected]
> http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
>
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to