On Wed, 5 Sep 2001, Barrie Slaymaker wrote:

> On Thu, Sep 06, 2001 at 10:09:28AM +0800, Stas Bekman wrote:
> > On Wed, 5 Sep 2001, Doug MacEachern wrote:
> >
> > > On Sun, 2 Sep 2001, Stas Bekman wrote:
> > >
> > > > File::Compare is quite useless. We need to compare a variable against the
> > > > file.
> > >
> > > then use 'eq', really, i just don't see a need for checksums here.
> > > but File::Compare should be usable, if changes to the header are made so
> > > date is not included, so you can do something like:
> > > generate FunctionTable.pm.new
> > > if different mv FileTable.pm.new FunctionTable.pm
> > > else unlink FunctionTable.pm.new
> > >
> > > see also mv-if-diff usage in Perl's build.
> >
> > OK, but that will work only if we take the date string out of
> > autogenerated file and put it into a .info file. Is that OK?
>
> Howsabout
>
>    my $new = $new_file_contents ;
>    my $old = slurp $file_name
>
>    s/\d\d\d\d(.\d\d){5}// for ( $new, $old ) ;
>
>    if ( $new ne $old ) {
>        write $file_name, $new_file_contents ;
>    }
>
> or am I missing something?

something like that. We need to disregard: 'Sun Aug 19 10:32:24 2001'
e.g. see xs/tables/current/Apache/ConstantsTable.pm

So probably
s/\w{3} \w{3} \d+ \d+:\d+:\d+ \d{4}//
will do

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to