On Tue Jul 15 16:57:01 2014, DROLSKY wrote:
Show quoted text> On Mon Jul 14 19:26:52 2014, beastie@tardisi.com wrote:
> > After restarting my irssi today (to update from 9.1-FreeBSD-p9 to
> > 9.1-
> > FreeBSD-p10), I found that twirssi wouldn't load in irssi.
> >
> > It would report "Cannot determine local time zone".
> >
> > Using:
> >
> > my $tz = DateTime::TimeZone-> new( name => 'local' );
> >
> > in simple test script, worked. But, not when the same is done inside
> > of irssi. Though it used to work....
> >
> > I threw in a lot of prints...and saw that from my simple script, it
> > finds /etc/localtime, a sym link. And, works through:
> >
> > DateTime::TimeZone::Chicago
> > DateTime::TimeZone::America::Chicago
> >
> > And, suceeds.
> >
> > But, when called from irssi....it continues on with
> >
> > DateTime::TimeZone::zoneinfo::America::Chicago
> > etc.
> >
> > before die'ng.
> >
> > Eventually, I noted that irssi had been running since its last update
> > and at that time 1.69 was installed.
> >
> > Working back gradually from:
> >
> > p5-DateTime-TimeZone-1.71_1
> > p5-DateTime-TimeZone-1.71
> > p5-DateTime-TimeZone-1.70
> >
> > to
> >
> > p5-DateTime-TimeZone-1.69
> >
> > Puts 1.69 as the version where things do start working again.
> >
> > Comparing 1.69 and 1.71_1, the only changes I see are the TimeZone
> > files (2014c -> 2014e)....so I'm lost on what's different to account
> > for this problem.
> >
> > Some other versions are:
> >
> > irssi-0.8.16_1
> > perl5-5.16.3_11
> >
> > twirssi.pl v2.6.3
>
> This is pretty odd, since there are really no changes of substance in
> the local time zone finding code in the past few releases. The last
> changes were in 1.64.
>
> I strongly suspect that this has nothing to do with this distro and
> something to do with how irssi sets up the Perl environment. For
> example, maybe the @INC dirs are not what you expect?
>
> When two identical pieces of code operate differently in two
> environments I find it's best to start by examining the environment in
> great detail.
Well, after some thought on how I might see what Perl is like in irssi...
I settled on this q&d script
#!/usr/bin/perl
use Irssi;
use Config qw(myconfig);
use Data::Dumper;
Irssi::print myconfig();
Irssi::print Dumper(@INC);
Irssi::print Dumper(%ENV);
loading this and comparing to a similar command line version.
The main difference was @INC inside of irssi is:
$VAR1 = '/home/lchen/.irssi/scripts';
$VAR2 = '/usr/local/share/irssi/scripts';
$VAR3 = '/usr/local/lib/perl5/5.16/mach';
$VAR4 = '/usr/local/lib/perl5/5.16/BSDPAN';
$VAR5 = '/usr/local/lib/perl5/site_perl/5.16/mach';
$VAR6 = '/usr/local/lib/perl5/site_perl/5.16';
$VAR7 = '/usr/local/lib/perl5/5.16';
$VAR8 = '.';
While from command line, its:
$VAR1 = '/usr/local/lib/perl5/5.16/BSDPAN';
$VAR2 = '/usr/local/lib/perl5/site_perl/5.16/mach';
$VAR3 = '/usr/local/lib/perl5/site_perl/5.16';
$VAR4 = '/usr/local/lib/perl5/5.16/mach';
$VAR5 = '/usr/local/lib/perl5/5.16';
$VAR6 = '.';
Just a slight difference in ordering, but
Forcing an update locatedb with 1.69 and then 1.71_1, yields only one result:
Show quoted text> locate Chicago.pm
/usr/local/lib/perl5/site_perl/5.16/DateTime/TimeZone/America/Chicago.pm
There were slight environment differences....just 3 insignificant ones -- REMOTE_HOST, SHLVL and WINDOW.