Giter Club home page Giter Club logo

dist-zilla-plugin-ourpkgversion's Introduction

NAME
    Dist::Zilla::Plugin::OurPkgVersion - no line insertion and does Package
    version with our

VERSION
    version 0.005001

SYNOPSIS
    in dist.ini

            [OurPkgVersion]

    in your modules

            # VERSION

DESCRIPTION
    This module was created as an alternative to
    Dist::Zilla::Plugin::PkgVersion and uses some code from that module.
    This module is designed to use a the more readable format "our $VERSION
    = $version;" as well as not change then number of lines of code in your
    files, which will keep your repository more in sync with your CPAN
    release. It also allows you slightly more freedom in how you specify
    your version.

  EXAMPLES
    in dist.ini

            ...
            version = 0.01;
            [OurPkgVersion]

    in lib/My/Module.pm

            package My::Module;
            # VERSION
            ...

    output lib/My/Module.pm

            package My::Module;
            our $VERSION = '0.01'; # VERSION
            ...

    please note that whitespace before the comment is significant so

            package My::Module;
            BEGIN {
                    # VERSION
            }
            ...

    becomes

            package My::Module;
            BEGIN {
                    our $VERSION = '0.01'; # VERSION
            }
            ...

    while

            package My::Module;
            BEGIN {
            # VERSION
            }
            ...

    becomes

            package My::Module;
            BEGIN {
            our $VERSION = '0.01'; # VERSION
            }
            ...

    you can also add additional comments to your comment

            ...
            # VERSION: generated by DZP::OurPkgVersion
            ...

    becomes

            ...
            our $VERSION = '0.1.0'; # VERSION: generated by DZP::OurPkgVersion
            ...

    Also note, the package line is not in any way significant, it will
    insert the "our $VERSION" line anywhere in the file before "# VERSION"
    as many times as you've written "# VERSION" regardless of whether or not
    inserting it there is a good idea. OurPkgVersion will not insert a
    version unless you have "# VERSION" so it is a bit more work.

    If you make a trial release, the comment will be altered to say so:

            # VERSION

    becomes

            our $VERSION = '0.01'; # TRIAL VERSION

METHODS
    munge_files
        Override the default provided by Dist::Zilla::Role::FileMunger to
        limit the number of files to search to only be modules and
        executables.

    munge_file
        tells which files to munge, see Dist::Zilla::Role::FileMunger

BUGS
    Please report any bugs or feature requests on the bugtracker website
    https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion/issues

    When submitting a bug or request, please include a test-file or a patch
    to an existing test-file that illustrates the bug or desired feature.

CONTRIBUTORS
    *   Alexandr Ciornii <[email protected]>

    *   Alexei Znamensky <[email protected]>

    *   Christian Walde <[email protected]>

    *   Christopher J. Madsen <[email protected]>

    *   David Golden <[email protected]>

AUTHOR
    Caleb Cushing <[email protected]>

COPYRIGHT AND LICENSE
    This software is Copyright (c) 2013 by Caleb Cushing.

    This is free software, licensed under:

      The Artistic License 2.0 (GPL Compatible)

dist-zilla-plugin-ourpkgversion's People

Contributors

xenoterracide avatar xdg avatar madsen avatar wchristian avatar russoz avatar

Stargazers

Axel Beckert avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.