Undefined subroutine &Scalar::Util::weaken

I’ve finally stumbled along enough to get things working (gotta love the
list archives), however when I click TOOLS from the main menu on the left, I
get the following errror. A little direction would be greatly appreciated.
To the best of my ability, I can’t find any glaring errors.

error: Undefined subroutine &Scalar::Util::weaken called at
/opt/rt3/lib/RT/Action/Generic.pm line 104.

context: …
100: $self->{‘TransactionObj’} = $args{‘TransactionObj’};
101: $self->{‘TemplateObj’} = $args{‘TemplateObj’};
102: $self->{‘Type’} = $args{‘Type’};
103: $self->CurrentUser( $args{‘CurrentUser’});
104: Scalar::Util::weaken($self->{‘ScripObj’});
105: Scalar::Util::weaken($self->{‘TicketObj’});
106: Scalar::Util::weaken($self->{‘TemplateObj’});
107: Scalar::Util::weaken($self->{‘TransactionObj’});
108:

code stack: /opt/rt3/lib/RT/Action/Generic.pm:104
/opt/rt3/lib/RT/Action/Generic.pm:79
/opt/rt3/share/html/Tools/Offline.html:107
/opt/rt3/share/html/autohandler:221

raw error

I’ve finally stumbled along enough to get things working (gotta love the
list archives), however when I click TOOLS from the main menu on the left,
I get the following errror. A little direction would be greatly
appreciated. To the best of my ability, I can’t find any glaring errors.

Try reinstalling Scalar::Util. It turns out that the “pure perl” version
of the module doesn’t have the ‘weaken’ method.

unfortuntely that did not do the trick.

No change in behaviour.

I also see similar errors in the /var/log/messages when it should be sending
emails about my first test ticket. example:

Dec 30 15:39:49 localhost RT: Scrip Prepare 6 died. - Undefined subroutine
&Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm line 104.
Stack: [/opt/rt3/lib/RT/Action/Generic.pm:104]
[/opt/rt3/lib/RT/Action/Generic.pm:79]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:163]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:463]
[/opt/rt3/lib/RT/Scrips_Overlay.pm:232]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:146]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3707]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:2527]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:2460]
[/opt/rt3/lib/RT/Interface/Web.pm:432]
[/opt/rt3/share/html/Ticket/Display.html:134]
[/opt/rt3/share/html/Ticket/Update.html:200]
[/opt/rt3/share/html/autohandler:221]
(/opt/rt3/lib/RT/Scrip_Overlay.pm:471)

if this helps… i have Scalar-List-Utils-1.14.

raw trace:
Undefined subroutine &Scalar::Util::weaken called at
/opt/rt3/lib/RT/Action/Generic.pm line 104.

Trace begun at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Exceptions.pm
line 131
HTML::Mason::Exceptions::rethrow_exception(‘Undefined subroutine
&Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm line
104.^J’) called at /opt/rt3/lib/RT/Action/Generic.pm line 104
RT::Action::Generic::_Init(‘RT::Action::CreateTickets=HASH(0x9c7e6a4)’,
‘CurrentUser’, ‘RT::CurrentUser=HASH(0x9c79cb8)’) called at
/opt/rt3/lib/RT/Action/Generic.pm line 79
RT::Action::Generic::new(‘RT::Action::CreateTickets’, ‘CurrentUser’,
‘RT::CurrentUser=HASH(0x9c79cb8)’) called at
/opt/rt3/share/html/Tools/Offline.html line 107
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9c76890)’)
called at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line
1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef) called at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 760
HTML::Mason::Request::call_next(‘HTML::Mason::Request::ApacheHandler=HASH(0x9be7df0)’)
called at /opt/rt3/share/html/autohandler line 221
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9a7b4dc)’)
called at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line
1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm
line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm
line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x9be7df0)’)
called at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm
line 134
eval {…} at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x9be7df0)’)
called at /usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm
line 827
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x883cf00)’,
‘Apache::RequestRec=SCALAR(0x999da30)’) called at /opt/rt3/bin/webmux.pl
line 126
eval {…} at /opt/rt3/bin/webmux.pl line 126
RT::Mason::handler(‘Apache::RequestRec=SCALAR(0x999da30)’) called at -e line
0
eval {…} at -e line 0

Reading the Scalar::Util.pm I found this quote “By default Scalar::Util does
not export any subroutines”… This could explain my problem but what is the
proper way to correct it?

Hello All,

I am running RT 3.2.2 on RedHat Enterprise Linux. No emails are being sent
out of RT, but tickets are getting created. I see the following error
message in the /var/log/messages file whenever RT tries to send out an
email.

Undefined subroutine &Scalar::Util::weaken

I saw some earlier posts on this. I am wondering if anyone found a solution.
I will really appreciate any help.

Raj

Rajesh Menon
Systems Administrator
311 Powers Hall
662-915-3862

Thanks to Mathew Walker’s (lmw94002@hotmail.com) suggestion, I fixed the
problem. I recompiled mod_perl and apache … that did the trick!!. It is
working without any problems now.

Raj

Rajesh Menon
Systems Administrator
311 Powers Hall
662-915-3862

Rajesh Menon wrote:

Thanks to Mathew Walker’s (lmw94002@hotmail.com) suggestion, I fixed the
problem. I recompiled mod_perl and apache … that did the trick!!. It is
working without any problems now.
Only mod_perl & apache and that did the trick? Did you upgrade its
versions? What system do you have? Was it distro packages before? Give
us more info about your distro.

This question should be documented on the wiki.

I am running RedHat Enterprise AS 3.0 on a Dell PowerEdge 2650 server.
Apache version is 1.3.31 and mod_perl is 1.29. The default version of perl
is 5.8.0 (came with RedHat). RT was using this version before. I think an
update of packages messed it up.

I didn’t have to upgrade anything. All I did was to re-compile mod_perl and
apache. Also I recompiled RT to use perl 5.8.6 (which I installed on an
alternate location leaving the default perl intact).

Hope this answers your question.

Raj

Rajesh Menon
Systems Administrator
311 Powers Hall
662-915-3862From: Ruslan U. Zakirov [mailto:Ruslan.Zakirov@acronis.com]
Sent: Thursday, January 20, 2005 3:31 AM
To: rajmen@olemiss.edu
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RE: Undefined subroutine &Scalar::Util::weaken

Rajesh Menon wrote:

Thanks to Mathew Walker’s (lmw94002@hotmail.com) suggestion, I fixed the
problem. I recompiled mod_perl and apache … that did the trick!!. It is
working without any problems now.
Only mod_perl & apache and that did the trick? Did you upgrade its
versions? What system do you have? Was it distro packages before? Give
us more info about your distro.

This question should be documented on the wiki.

Raj

Rajesh Menon
Systems Administrator
311 Powers Hall
662-915-3862


The rt-users Archives

RT Administrator and Developer training is coming to your town soon!
(Boston, San Francisco, Austin, Sydney) Contact training@bestpractical.com
for details.

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Hello,

I’m having a problem lately with RT. None of my scripts seem to be
working. I recently had to reinstall the operating system RT was running
on. I’m using 3.4.5 on Debian Etch.

All my scripts seem to terminate with this error:

“[error]: Scrip Prepare XX died. - Undefined subroutine
&Scalar::Util::weaken called at
/usr/share/request-tracker3.4/lib/RT/Action/Generic.pm line 108.”

Reading through the archives I saw a similar post that was fixed by
updating Scalar::Utils to 1.19. Mine was already at 1.19 so I decided to
reinstall it with “cpan -fi Scalar::Util”
No change to the error message. Tickets come in and go into the right
queues but the no one is notified and the requestor doesn’t receive any
acknowledgment of his submission.

Any ideas what to look next?

Thanks.

-Martin Ekendahl

Some misc information:

Server version: Apache/1.3.34 (Debian)
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
Linux server1 2.6.18-3-amd64 #1 SMP Mon Dec 4 17:04:37 CET 2006 x86_64
GNU/Linux
Scalar::Util is up to date (1.19).
psql (PostgreSQL) 7.4.16

Martin Ekendahl MobileRobots Inc
IT Manager Amherst, NH
martin@mobilerobots.com (603) 881-7960

Hello list,

I was using RT on my production server successfully. We were not using RT from sometime. We decided to use RT from today. Tickets are generating and getting resolved, all things are working well except the email parts. No email is going outside or coming to RT. In log i am seeing the error

[error]: Scrip Prepare 9 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm

[error]: Scrip Prepare 10 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm line 107

I gone through the archives and followed some answers like upgrading scalar::utils. But this package is already updated.

Please help me out. Operating system on which RT is installed is Centos-5.

Looking forward to some help.

Thanks & Regards
Bijayant Kumar

Bijayant Kumar
Send instant messages to your online friends http://uk.messenger.yahoo.com

Hello list,

I was using RT on my production server successfully. We were not using RT from sometime. We decided to use RT from today. Tickets are generating and getting resolved, all things are working well except the email parts. No email is going outside or coming to RT. In log i am seeing the error

[error]: Scrip Prepare 9 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm

[error]: Scrip Prepare 10 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm line 107

I gone through the archives and followed some answers like upgrading scalar::utils. But this package is already updated.

Please help me out. Operating system on which RT is installed is Centos-5.

If i remember correctly, Centos is one of those distros that decided it was a
good idea to default to the perl-only implementation of Scalar::Util, but you
need the XS support for weaken.

You say you’ve upgraded scalar::utils. Was that through CPAN? If so, did you
make sure to answer yes to the XS question?

J
Jody Belka
knew (at) pimb (dot) org

I have tried to upgrade through CPAN only, but it said that package is already updated. After some more googling i did

perl -MCPAN -e ‘install “G/GB/GBARR/Scalar-List-Utils-1.18.tar.gz”’

and it solves the problem of mail.

But now i am facing another very strange problem.
The autoreply greeting message that i am getting is very strange.
In a mail the upper part contains greeting message with ticket id, and at the bottem another greeting mail written with some another ticket id that were never being created.

Did you or anybody faced the same problem. Please suggest some thing to overcome from this problem.

lists-rt@pimb.org wrote: On Mon, Nov 12, 2007 at 11:52:13AM +0000, bijayant kumar wrote:

Hello list,

I was using RT on my production server successfully. We were not using RT from sometime. We decided to use RT from today. Tickets are generating and getting resolved, all things are working well except the email parts. No email is going outside or coming to RT. In log i am seeing the error

[error]: Scrip Prepare 9 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm

[error]: Scrip Prepare 10 died. - Undefined subroutine &Scalar::Util::weaken called at /opt/rt3/lib/RT/Action/Generic.pm line 107

I gone through the archives and followed some answers like upgrading scalar::utils. But this package is already updated.

Please help me out. Operating system on which RT is installed is Centos-5.

If i remember correctly, Centos is one of those distros that decided it was a
good idea to default to the perl-only implementation of Scalar::Util, but you
need the XS support for weaken.

You say you’ve upgraded scalar::utils. Was that through CPAN? If so, did you
make sure to answer yes to the XS question?

J
Jody Belka
knew (at) pimb (dot) org
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Bijayant Kumar
Send instant messages to your online friends http://uk.messenger.yahoo.com