Kilokahn
Kilokahn

Reputation: 2311

Using maven for perl projects

We have seen Maven perform very well for our Java-based projects. I see from this question that non-java projects can also be retrofit as maven modules, albeit they will only be using the maven-exec-plugin for different goals. On googling, I saw maven-perl-plugin but it is still a 1.0-SNAPSHOT with sporadic updates, but certainly looks very promising. Has anyone used this one or any other competitor which will relieve me of writing non-interesting pom boiler-plate?

EDIT: Actually the major part of the project is the n-tiered Java modules and there is a very small perl/python component (for backend parsing) and I am looking for a place to fit it into this ecosystem. I get advantages like using maven-release-plugin to do tag/branch creation and release processes and having it as a part of the same codebase gives me version number consistency. So while I don't intend to use dependency retrieval means of maven for perl modules (sorry that I didn't research enough on the maven-perl-plugin boy), I wanted to know what are the points to be kept in mind when doing such a thing (or if such a thing doesn't make sense) e.g. what should be the module name (topLevelModuleName-perl?) and the structure beneath src/main/perl and src/test/perl. I know I might be going down a slippery slope trying to shoehorn one thing to the other, but doesn't hurt to ask :)

Upvotes: 5

Views: 3729

Answers (3)

Kilokahn
Kilokahn

Reputation: 2311

At this point, I am inclined to not use maven-perl-plugin for its dependency feature because it seems to have overlap with much well-established peers like Dist::Zilla and Module::Build. Since no one really commented on the edit, I am left with maintaining the existing project structure like

<perl-module-name>
    -lib
    -etc
    -bin

and not really changing anything other than add a pom file with the tarball being created as the output artifact.

Feel free to post any other suggestions.

Upvotes: 1

Sebastian Stumpf
Sebastian Stumpf

Reputation: 2791

I've had a quick glance at this plugin and I don't see the point of pulling in dependencies like Java and XML just to manage your project.

Actually I think that we already have something much better: Dist::Zilla. Setting up your project is as easy as dzil new My::Project - and Dist::Zilla takes care of everything else.

No more Makefiles, READMEs, MANIFESTs... Just type dzil build/test/install/release and everything will be done according to your profile and dist.ini.

And if you are missing some dependencies from CPAN, add this to your config and cpanminus can be integrated smoothly into your new workflow.

[alias]
    instdeps = install --install-command "cpanm ."

Upvotes: 0

woky
woky

Reputation: 4936

That's crazy. Use something sane like Module::Build and for dependencies use CPAN (or cpanm). Seriously, for anything that's not Java you have to write load of XML for load of crazy plugins. With Module::Build (or any script) you program your build and you can use any library that's available for the language (you just need to get them with cpanm before).

Upvotes: 1

Related Questions