[Bro-Dev] script loading changes

Robin Sommer robin at icir.org
Wed Jul 13 10:48:27 PDT 2011


On Wed, Jul 13, 2011 at 12:17 -0500, you wrote:

>     @load foo.bar/foo/bar.blub.something
 
> 1) foo.bar/foo/bar.blub.something
> 2) foo.bar/foo/bar.blub.something.bro
> 3) foo/bar/foo/bar/blub/something
> 4) foo/bar/foo/bar/blub/something.bro
> 
> We never make it past #2 because that's the right name.

Right.

> But from a new user's perspective, it's not intuitive to try the
> literal version because everywhere else, the convention is to reference
> scripts in packages in the dotted format, which would be:
> 
>    @load foo.bar.foo.bar.blub.something
> 
> and that would search BROPATH for
> 
> 1) foo.bar.foo.bar.blub.something
> 2) foo.bar.foo.bar.blub.something.bro
> 3) foo/bar/foo/bar/blub/something
> 4) foo/bar/foo/bar/blub/something.bro
> 
> And none of those are right.

Yeah, but I at least wouldn't expect anything else than the literal
path to work here for foo.bar/foo/bar.blub.something anyway; not sure
that's really unintuitive, it's messy to begin with already. :)

How about one more tweak to the rules to make this explict: if there's
at least one slash in a name, we don't do any dot-to-slash
substiations at all. I.e., if you use use actual paths, you need to
point to literal files names. If you use dot-style, we'll translate it
into paths for you. Does that make sense?

Robin

-- 
Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org


More information about the bro-dev mailing list