[Bro-Dev] Loading directories
jsiwek at ncsa.illinois.edu
Wed Jun 1 13:43:37 PDT 2011
> What I'm wondering hiwer is whether we should move "foo.bro" into the
> subdirectory under some magic name (like init.bro or __init__.bro or
> __package__.bro or ...). And then allow to write "@load foo" (with
> "foo" now being the directory name) with the effect of loading
I think that makes sense to me.
A minor detail would be choosing which gets preference: a file or a directory. E.g. say you had a "foo.bro" file and a "foo/" directory that live on the same path, what does "@load foo" actually load?
> In addition, inside foo/* we could allow "@load ext1.bro" instead of "@load foo/ext1.bro".
> (Coincidentally, this would be quite like Python does it ... :)
Initially only seemed to me like a minor convenience is gained from this, but I can't really argue against making things more analogous to an existing language.
More information about the bro-dev