Compilation with gcc 4.6.0
rra at stanford.edu
Wed Jul 6 17:39:19 UTC 2011
Julien ÉLIE <julien at trigofacile.com> writes:
> We currently have:
> * filter_innd.pl and startup_innd.pl
> * filter_nnrpd.pl
> * nnrpd_access.pl and nnrpd_access_wrapper.pl
> * nnrpd_auth.pl and nnrpd_auth_wrapper.pl
> With you suggestion of namespace, I think it would be:
> * INN::Filter::Transit
> * INN::Filter::Reader
> * INN::Access::Reader
> * INN::Auth::Reader
> Does it sound good?
Yup. I like that.
> Though I have still not searched and tested, I hope there is a way to
> load the functions defined in a Perl script (our current filter_innd.pl
> for instance) and find them as INN::Filter::Transit::filter_art() from
> our C API. It would then be transparent for Cleanfeed, Postfilter and
> similar programs; and also for our (external) documentation :-)
Generally, the "right" way to do that would be for the Perl script to
define the namespace (using package), but given the weird way that we load
those scripts right now, by executing do, I suspect we could just, in the
C code doing the loading, tack a package command on first. In other
words, I think we run C code to manually execute something like:
right now. If we change that to:
package INN::Filter::Transit; do '/path/to/file.pl';
(for example), I think that would do the right thing.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers