On Tue, 28 Aug 2001, Doug MacEachern wrote:
> On Wed, 29 Aug 2001, Stas Bekman wrote:
>
> > it's still not working perfectly, since it has to fish $dump out of the
> > file, and I see that it doesn't work for all current files.
>
> you could change the warning header to include:
> # __END_OF_HEADER__
> or something to make it easier to parse/compare.
ok
> and those files don't actually need the extra 1; at the end since
> $Apache::FunctionTable = ... will result in true value return.
still nice to have 1; at the end to the follow the guidelines :)
> > I think a much better solution will be to write the
> >
> > "$file.dump.md5" and compare Digest::MD5::md5($dump) with the contents
> > of this file.
>
> that would be slick, but that's another cpan dependency (for those using
> 5.6.1).
What's the problem with having new dependencies on CPAN? Digest::MD5 seems
to be a core module. Remember that everybody talks about SDKs, so we will
end up with dependencies anyways. If we do PREREQ_PM, CPAN will
automatically install all the requirements, so will Bundle::Apache2.
> if it makes it easier to leave the date out of the .pm, you could do
> that and maybe generate a FunctionTable.datestamp with the generation
> date. actually, something like FunctionTable.info that includes
> datestamp, module magic number, and whatever else might be useful down
> the road.
You still have to say, "this file is autogenerated..." so the parsing is
still required unless you don't compare $dump, but first put $dump into a
variable that is about to replace the whole file.
I favor to have FunctionTable.info, that has MD5 and other info.
The same goes for Inline::Files which will make it really cool for
response modules, but this one has much heavier dependencies, so I'm fine
to leave this one out. But MD5?
_____________________________________________________________________
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]