Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[module-management] convert comments into pod
  • Loading branch information
Paul Cochrane committed Mar 7, 2015
1 parent 27fa3dc commit a1d2c40
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions categories/module-management/Fletcher.pl
@@ -1,21 +1,28 @@
use v6;

# A sketch program to compute unique file names for Perl modules based
# on the Fletcher-16 hash.
#
# Author: Daniel Carrera
# License: Public Domain
#
# Example: Foo::Bar-auth:92de-ver:1.2.0--0
#
# Explanation:
# The module name (Foo::Bar) is URL-encoded. After that, we add all
# metadata sorted by key. Version numbers are left intact. Other
# metadata is hashed with Fletcher-16.
#
# Lastly, a counter is added at the end. If two different modules
# get the exact same name (extremely unlikely) we use a counter to
# distinguish them.
=begin pod
=TITLE Unique module names with the Fletcher-16 hash
=AUTHOR Daniel Carrera
A sketch program to compute unique file names for Perl modules based
on the Fletcher-16 hash.
License: Public Domain
Example: Foo::Bar-auth:92de-ver:1.2.0--0
Explanation:
The module name (Foo::Bar) is URL-encoded. After that, we add all metadata
sorted by key. Version numbers are left intact. Other metadata is hashed
with Fletcher-16.
Lastly, a counter is added at the end. If two different modules get the
exact same name (extremely unlikely) we use a counter to distinguish them.
=end pod

my @modules = (
{name => "Foo::Bar", meta => {auth=>'mailto:dave@example.com', ver=>'1.2.0'}},
Expand Down

0 comments on commit a1d2c40

Please sign in to comment.