in reply to my VS. our

We need more than this. What does it tell you while failing? Have you tried running them in different order (i.e., does t2 fail because t1 has taken the filename)?

Replies are listed 'Best First'.
Re^2: my VS. our
by lathropr (Initiate) on May 26, 2005 at 20:11 UTC
    Neither script produces error messages. I added some debugging statements inside prefs.pm so I could see the execution flow (and fixed the newval statement):

    pref.pm
    package prefs; use strict; use Config::IniFiles; our @ISA = qw( Config::IniFiles ); sub new { my $self = shift; my $class = (ref $self) || $self; print "creating $class\n"; my $fname = 'fubar.ini'; my $obj; if (-f $fname) { $obj = $self->SUPER::new( -file => $fname ); } else { $obj = $self->SUPER::new(); $obj->SetFileName( $fname ); $obj->newval('fubar', 'var1', 'default'); } return bless($obj, $class); } sub DESTROY { my $self = shift; $self->RewriteConfig(); print "destroying $self\n"; $self->SUPER::DESTROY(@_); } 1;
    Here is the output:
    I am using Perl 5.8.6 on Win32 (Windows XP) with Config::IniFiles 2.38. I am able to reproduce the same problem on Solaris 8 with Perl 5.8.0 and Config::IniFiles 2.38.