Recommended directory structure when developing Plugins and with Djabberd source

Martin Atkins mart at degeneration.co.uk
Thu Jan 31 18:37:36 UTC 2008


Jacob Burkhart wrote:
> 
> I've been working with a patched up older copy of Djabberd for a while, 
> and now I'm working on extracting those patches into plugins and 
> preparing some changes for submission upstream.
> 
> Anyway, It looks like the version of Djabberd I'm working with has a 
> djabberd_start.pl file that runs it, and all my plugins are in a folder 
> called Djabberd in the same directory as djabberd_start.pl
> 
> The latest copy of the source from the sixapart repository has a file 
> called djabberd (which is basically the same as my djabberd_start.pl 
> file)  So my file system won't let me create a directory called Djabberd 
> (for my plugins) in the same directory as the djabberd file.

A while back the repository was restructured so that the core is
separate from the "core plugins". This makes it easier to then package
them separately for CPAN and avoid having one huge package with
monstrous dependencies.

The trunk/DJabberd/ directory is equivalent to what was formerly the
root of the repository.

> How do other developers have this setup, where do you put you plugins?
> 
> Also, if anybody writes tests for their plugins, what directory 
> structure do you use during development to support this?
> 

If you're making a new plugin for distribution, you should just package
it as a standard CPAN package, with the "lib" directory for libraries
and the "t" directory for tests. This can then be installed the same way
as any other CPAN package.

If you'd rather not install your plugins in your system's perl lib
directory, you can just make sure that DJabberd looks in your
alternative directory by mechanisms such as setting the PERL5LIB
environment variable before running it.

Cheers,
Martin




More information about the Djabberd mailing list