Skip to content

Commit

Permalink
Build results of eff492a (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Apr 29, 2016
1 parent c890dce commit 094910e
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Release history for Dist-Zilla-Plugin-Beam-Connector

0.001001 2016-04-29T07:36:16Z 75d0f96
- Revised and improved recommendations around namespacing and packaging

0.001000 2016-04-29T06:41:35Z db240bf
- First version.
8 changes: 4 additions & 4 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"provides" : {
"Dist::Zilla::Plugin::Beam::Connector" : {
"file" : "lib/Dist/Zilla/Plugin/Beam/Connector.pm",
"version" : "0.001000"
"version" : "0.001001"
}
},
"release_status" : "stable",
Expand All @@ -146,7 +146,7 @@
"web" : "https://github.com/kentnl/Dist-Zilla-Plugin-Beam-Connector"
}
},
"version" : "0.001000",
"version" : "0.001001",
"x_BuiltWith" : {
"external_file" : "misc/built_with.json"
},
Expand Down Expand Up @@ -659,7 +659,7 @@
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "0.001000-source",
"tag" : "0.001001-source",
"tag_format" : "%v-source",
"tag_message" : "v%v"
},
Expand Down Expand Up @@ -750,7 +750,7 @@
"branch" : "releases",
"changelog" : "Changes",
"signed" : 0,
"tag" : "0.001000",
"tag" : "0.001001",
"tag_format" : "%v",
"tag_message" : "v%v"
},
Expand Down
4 changes: 2 additions & 2 deletions META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: Dist-Zilla-Plugin-Beam-Connector
provides:
Dist::Zilla::Plugin::Beam::Connector:
file: lib/Dist/Zilla/Plugin/Beam/Connector.pm
version: '0.001000'
version: '0.001001'
recommends:
Moose: '2.000'
Path::Tiny: '0.058'
Expand All @@ -41,4 +41,4 @@ resources:
bugtracker: https://github.com/kentnl/Dist-Zilla-Plugin-Beam-Connector/issues
homepage: https://github.com/kentnl/Dist-Zilla-Plugin-Beam-Connector
repository: https://github.com/kentnl/Dist-Zilla-Plugin-Beam-Connector.git
version: '0.001000'
version: '0.001001'
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ my %WriteMakefileArgs = (
"constant" => 0,
"lib" => 0
},
"VERSION" => "0.001000",
"VERSION" => "0.001001",
"test" => {
"TESTS" => "t/*.t t/00-compile/*.t t/example/*.t"
}
Expand Down
38 changes: 30 additions & 8 deletions lib/Dist/Zilla/Plugin/Beam/Connector.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use warnings;

package Dist::Zilla::Plugin::Beam::Connector;

our $VERSION = '0.001000';
our $VERSION = '0.001001';

# ABSTRACT: Connect events to listeners in Dist::Zilla plugins.

Expand Down Expand Up @@ -185,7 +185,7 @@ Dist::Zilla::Plugin::Beam::Connector - Connect events to listeners in Dist::Zill
=head1 VERSION
version 0.001000
version 0.001001
=head1 SYNOPSIS
Expand Down Expand Up @@ -368,21 +368,43 @@ in total isolation, because you have no idea where your events are going to get
scope of your plugin ), and receivers have no solid expectations of where events are going to come from ( because that
is dictated by the connector ).
=head2 Implementing an Event
=for stopwords Namespace namespace
Events themselves are quite straight forward: They're just objects, objects extending
L<< C<Beam::Event>|Beam::Event >>.
=head2 Namespace and Indexing recommendations
It is presently recommended you define these events inline somewhere, either in the plugin that emits them,
or in some shared container.
It is also recommended to I<NOT> index said Event packages at present.
The B<< recommended namespace >> scheme to follow is:
Dist::Zilla::Event::
Preferably, structuring it similar to your plugin
Dist::Zilla::Plugin::Thing::Dooer
Dist::Zilla::Event::Thing::Dooer::BeforeDoingThing
This I'm sure you'll agree is much nicer than
Dist::Zilla::Plugin::Thing::Dooer::BeforeDoingThingEvent # O_O
Dist::Zilla::Plugin::BeforeDoingThingEvent # Not a plugin
It is also recommended to I<NOT> index said Event packages at present, as that
would encourage people depending on the events at some point, which for this system, is
likely unwanted toxicity.
Only people emitting events should be caring about loading the class.
=head2 Implementing an Event
Events themselves are quite straight forward: They're just objects, objects extending
L<< C<Beam::Event>|Beam::Event >>.
This is an example event definition: It will communicate a file name it intends to prepend lines to
and pass a mutable, empty array for the event handler to inject lines into.
package # hide from PAUSE
Dist::Zilla::Plugin::Prepender::AppenderEvent;
Dist::Zilla::Event::Prepender::BeforePrepend;
use Moose; # or Moo, both work
extends "Beam::Event"
Expand Down Expand Up @@ -412,7 +434,7 @@ Once you have an Event class designed, gluing it into your code is also quite si
'before_append', # the "name" of the event, this corresponds to the "connector"
# property in Beam::Connector
class => 'Dist::Zilla::Plugin::Prepender::AppenderEvent', # The class to construct an instance of
class => 'Dist::Zilla::Event::Prepender::BeforePrepend', # The class to construct an instance of
filename => 'lib/Foo.pm', # attribute property of the Event object.
);
Expand Down
2 changes: 2 additions & 0 deletions misc/Changes.deps
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This file contains changes in REQUIRED dependencies for standard CPAN phases (configure/build/runtime/test)

0.001001
2 changes: 2 additions & 0 deletions misc/Changes.deps.all
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL dependencies for all phases (configure/build/runtime/test/develop)

0.001001
2 changes: 2 additions & 0 deletions misc/Changes.deps.dev
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This file contains changes to DEVELOPMENT dependencies only ( both REQUIRED and OPTIONAL )

0.001001
2 changes: 2 additions & 0 deletions misc/Changes.deps.opt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This file contains changes in OPTIONAL dependencies for standard CPAN phases (configure/build/runtime/test)

0.001001

0 comments on commit 094910e

Please sign in to comment.