Re: Occasional problems with URI package under mp

2006-09-20 Thread Kjetil Kjernsmo
On Wednesday 20 September 2006 14:35, Tom Schindl wrote: > @INC = qw(/usr/lib/perl5/Apache2,/usr/share/perl5/,); Errr... I just couldn't imagine that anybody could have done that to our @INC, but I asked around the office and it went like: me: "So, do we have any code that modifies @INC?" cow-or

Re: Occasional problems with URI package under mp

2006-09-20 Thread Tom Schindl
Kjetil Kjernsmo schrieb: > On Tuesday 19 September 2006 16:30, Michael Peters wrote: >>> URI.pm location: /usr/lib/perl5/Apache2/URI.pm >>> Can't locate object method "new" via package "URI" at [blah] >> That's Apache2::URI, not URI. > > Duh! I'm blind! :-) > >> What does the command line ve

Re: Occasional problems with URI package under mp

2006-09-20 Thread Kjetil Kjernsmo
On Tuesday 19 September 2006 16:30, Michael Peters wrote: > > URI.pm location: /usr/lib/perl5/Apache2/URI.pm > > Can't locate object method "new" via package "URI" at [blah] > > That's Apache2::URI, not URI. Duh! I'm blind! :-) > What does the command line version of > that same script prin

Re: Occasional problems with URI package under mp

2006-09-19 Thread Michael Peters
Kjetil Kjernsmo wrote: > On Tuesday 19 September 2006 16:05, Garrett, Philip (MAN-Corporate) > wrote: >> warn "URI.pm location: $INC{'URI.pm'}\n"; >> >> If it's different for the failures than it is for the successes, you >> have your culprit. > > Hmmm, nope, that was OK... Doesn't look OK t

Re: Occasional problems with URI package under mp

2006-09-19 Thread Kjetil Kjernsmo
On Tuesday 19 September 2006 16:05, Garrett, Philip (MAN-Corporate) wrote: >   warn "URI.pm location: $INC{'URI.pm'}\n"; > > If it's different for the failures than it is for the successes, you > have your culprit. Hmmm, nope, that was OK... So, I have use URI; warn "URI.pm location: $INC{'URI.

RE: Occasional problems with URI package under mp

2006-09-19 Thread Garrett, Philip \(MAN-Corporate\)
Kjetil Kjernsmo wrote: > > Actually, the problem was far less reproducible than I first > thought... At some point, I would get this error with > use URI; > use LWP::UserAgent; > my $netloc = URI->new('http://www.blogger.com/feeds/default/blogs'); > my $ua = LWP::UserAgent->new; > > warn "foo"; >

Re: Occasional problems with URI package under mp

2006-09-19 Thread Michael Peters
Kjetil Kjernsmo wrote: > The first suspicion is of course that there exists a different package > URI somewhere in the system, which is only used by the web server, but > I can't find anything. Print out $INC{'URI.pm'} from both Apache and the cmd line just to be sure they're using the same t

Re: Occasional problems with URI package under mp

2006-09-19 Thread Kjetil Kjernsmo
On Tuesday 19 September 2006 15:26, Garrett, Philip (MAN-Corporate) wrote: > Maybe a stupid question, but do you have "use URI" in that program? Yep! But an entirely appropriate question in this situation. :-) Actually, the problem was far less reproducible than I first thought... At some point

RE: Occasional problems with URI package under mp

2006-09-19 Thread Garrett, Philip \(MAN-Corporate\)
Kjetil Kjernsmo wrote: > Hi all! > > We've been seeing some really weird things with LWP, but only when > running it on the web server. It works fine when running from the > command line. > > For example, doing this: > my $netloc = URI->new('http://www.blogger.com/feeds/default/blogs'); > curre

Occasional problems with URI package under mp

2006-09-19 Thread Kjetil Kjernsmo
Hi all! We've been seeing some really weird things with LWP, but only when running it on the web server. It works fine when running from the command line. For example, doing this: my $netloc = URI->new('http://www.blogger.com/feeds/default/blogs'); currently results in a Can't locate object