Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dist-zilla-role-version-sanitize
Sanitize a version from a plugin
https://github.com/kentnl/dist-zilla-role-version-sanitize
dist-zilla perl
Last synced: 18 days ago
JSON representation
Sanitize a version from a plugin
- Host: GitHub
- URL: https://github.com/kentnl/dist-zilla-role-version-sanitize
- Owner: kentnl
- License: other
- Created: 2013-12-01T09:38:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T09:10:12.000Z (almost 8 years ago)
- Last Synced: 2024-11-11T14:05:45.044Z (3 months ago)
- Topics: dist-zilla, perl
- Language: Perl
- Size: 218 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.pod
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dist::Zilla::Role::Version::Sanitize - Sanitize a version from a plugin
# VERSION
version 0.002004
# ATTRIBUTES
## `normal_form`
Determines which [_normal form_](#normal-forms) is used.
Default is : **`numify`**
## `mantissa`
Determines the mandatory length of the `mantissa` for the [`numify`](#numify) normal form.
Default is : **`6`**
Which yields:
1.001001
10.001001
100.001001
1000.001001Etc.
# NORMAL FORMS
## `normal`
Normalizes to the notation:
v1
v1.2
v1.2.3
v1.2.3.4## `normal_3`
Normalizes to the notation
1.2.3
1.2.3.4Note: Due to the absence of the leading `v`, 3, is the minimum number of places that can be represented in this notation.
Accidentally normalizing to
1.2
In this form should raise a fatal exception.
## `numify`
Normalizes to the notation
1.23456789
| ^------^--- The Mantissa
|
^------------ Integer part.And the length for mantissa is forced by `mantissa`, either _truncating_ to `mantissa` length, or `paddding` to `mantissa` length with `0`'s
# AUTHOR
Kent Fredric
# COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.