|
NAMEDancer::Development - guide for developers interested in contributingVERSIONversion 1.3513DESCRIPTIONThis guide has been written to help anyone interested in contributing to the development of Dancer.First of all - thank you for your interest in the project! It's the community of helpful contributors who've helped Dancer experience phenomenal growth to get to where it is today. Please read this guide before contributing to Dancer, to avoid wasted effort and maximizing the chances of your contributions being used. WAYS TO CONTRIBUTEThere are many ways to contribute to the project. Dancer is a young yet active project and any kind of help is very much appreciated!PublicityYou don't have to start by hacking the code, spreading the word is very valuable as well!If you have a blog, just feel free to speak about Dancer. If you're a Twitter user, you can tweet about it with the hashtag "#perl" (and feel free to follow @PerlDancer for news and updates on Dancer!). Of course, it doesn't have to be limited to blogs or Twitter. Feel free to spread the word in whatever way you consider fit and drop us a line on the Dancer user mailing list noted below. Also, if you're using and enjoying Dancer, rating us on cpanratings.perl.org <http://cpanratings.perl.org/dist/Dancer>, explaining what you like about Dancer is another very valuable contribution that helps other new users find us! Mailing list / IRC communitySubscribing to the mailing list and/or hanging out on our IRC channel and providing assistance to new users is incredibly valuable.
DocumentationWhile we value documentation very much, it's difficult to keep it up-to-date. If you find a typo or an error in the documentation please do let us know - ideally by submitting a patch with your fix (see "Patch Submission").Contribute to CPAN TestersIf you have access to perl on rare operating systems, please consider contributing tests. See <http://wiki.cpantesters.org/wiki/TestDuringInstall> for more information.CodeYou can write extensions (plugins) for Dancer extending Dancer's core functionality or contribute to Dancer's core code, see "Patch Submission" below.GENERAL DEVELOPMENT GUIDELINESThis section lists high-level recommendations for developing Dancer, for more detailed guidelines, see "Coding Guidelines" below.Quality AssuranceDancer should be able to install for all Perl versions since 5.8, on any platform for which Perl exists. We focus mainly on GNU/Linux (any distribution), *BSD and Windows (native and Cygwin).We should avoid regressions as much as possible and keep backwards compatibility in mind when refactoring. Stable releases should not break functionality and new releases should provide an upgrade path and upgrade tips such as warning the user about deprecated functionality. Quality SupervisionWe can measure our quality using the CPAN testers platform: <http://www.cpantesters.org>.A good way to help the project is to find a failing build log on the CPAN testers: <http://www.cpantesters.org/distro/D/Dancer.html> If you find a failing test report, feel free to report it as a GitHub issue: <https://github.com/PerlDancer/Dancer/issues>. Reporting BugsWe prefer to have all our bug reports on GitHub, in the issues section: <https://github.com/PerlDancer/Dancer/issues>. It's possible though to report bugs on RT as well: <https://rt.cpan.org/Dist/Display.html?Queue=Dancer>Please make sure the bug you're reporting does not yet exist. In doubt please ask on IRC. Patch SubmissionThe Dancer development team uses GitHub to collaborate. We greatly appreciate contributions submitted via GitHub, as it makes tracking these contributions and applying them much, much easier. This gives your contribution a much better chance of being integrated into Dancer quickly!To help us achieve high-quality, stable releases, git-flow workflow is used to handle pull-requests, that means contributors must work on their "devel" branch rather than on their "master". (Master should be touched only by the core dev team when preparing a release to CPAN; all ongoing development happens in branches which are merged to the "devel" branch.) Here is the workflow for submitting a patch:
About the Release CycleSince version 1.2, the team has decided to take a step further toward production concerns: Dancer now promises to provide an API-stable and feature frozen release, whose updates will only be about bugfixes and documentation updates.After some discussion with the core-team members, it has been agreed that the 1.2xx release series will be the first of this kind, and will live as long as 1.3xx lives. As soon as the last 1.3xx release is mature enough and the core team is happy with, it will be uploaded as the first version of the 1.4xx series, and 1.2xx will become obsolete. This lets us evolve quickly in our main track (devel in GitHub will contain all the daily work we want to make 1.3xx better) but as well, it lets us assure maintainability for the 1.2 series, as we will probably have to fix a bug somewhere in 1.2 without merging with new stuff contained in the devel branch. That's why a maintenance branch is added to the repo. To be very clear, this branch is named "frozen", to reflect the idea that the source-code in this branch is not meant to evolve regarding features. It should only contains fixes for bug or documentation updates. If you want to submit a pull-request to the frozen branch (that means 1.3xx is out and you've found a bug in 1.2xx) you need to base your work on the "frozen" branch. Use the same procedure explained before, but with the "frozen" branch. RESOURCES FOR DEVELOPERSMailing ListsA mailing list is available here: <http://lists.preshweb.co.uk/mailman/listinfo/dancer-users>IRC ChannelsYou can reach the development team on irc.perl.org, channel #dancer or via a web chat interface at <http://www.perldancer.org/irc>. We're always happy to hear from users and contributors.RepositoriesThe official repository is hosted on GitHub at the following location: <https://github.com/PerlDancer/Dancer>.Official developers have write access to this repository, contributors are invited to fork it if they want to submit patches, as explained in the Patch submission section. The repository layout is organized as follows:
Working with the devel branch The distribution is managed with Dist::Zilla. This means than many of the usual files you might expect are not in the repository, but are generated at release time. However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficient for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at <https://metacpan.org/release/Dancer>. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends Dancer Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: # with cpanminus $ dzil authordeps --missing | cpanm # with cpan $ cpan `dzil authordeps --missing` You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: # with cpanminus $ dzil listdeps --author --missing | cpanm # or just plain cpan... $ cpan `dzil listdeps --author --missing` You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends Dancer Once installed, here are some dzil commands you might try:
This Is Complicated. Is There an Easier Way? Actually, yes there is. You can also branch out directly from the master branch, which corresponds to the code is generated by Dist::Zilla and what is uploaded to CPAN. It won't contain any of the changes brought to the codebase since the last CPAN release, but for a small patch that shouldn't be a problem. CODING GUIDELINESThis section describes standards and requirements for coding. For more broad guidelines, see "GENERAL DEVELOPMENT GUIDELINES" above.About DependenciesDancer is intended to be a micro-framework. That means among other things that it should remain lightweight. For this reason we try very hard to keep the dependencies as low as possible. On the other hand, we don't want to reinvent the wheel either.We not likely to accept a new dependency to the core unless there is a very good reason. If a patch provides a new feature that depends on a module, the solution is to perform a dynamic loading. Dancer has a class dedicated to that job: Dancer::ModuleLoader. Here is an example of how to use it: package Dancer::Some::Thing; use Carp; sub init { Dancer::ModuleLoader->load('Some::Deps') or croak "the feature provided by Dancer::Some::Thing needs Some::Deps"; } That way, an optional feature doesn't block Dancer from being installed since the dependency check is performed at runtime. PerltidyTestsRELEASINGPublic ReleasesPublic and stable releases are those without an underline ('_') in the version number. The latest stable release can be downloaded from CPAN and github.com.Developer ReleasesDeveloper releases are those which include an underline ('_') in the version number. Whenever the devel branch has been merged into the master branch, the CPAN release built must be a developer version (the version number contains a '_').Before a new release is made, the uploaders must wait for the CPAN testers reports. This is done to make sure the new merge doesn't bring regressions. RoadmapFor current information on Dancer's plans for the future, see the file TODO at <https://github.com/PerlDancer/Dancer/blob/master/TODO>.AUTHORDancer Core DevelopersCOPYRIGHT AND LICENSEThis software is copyright (c) 2010 by Alexis Sukrieh.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |