Skip to content

Commit

Permalink
release v1.018
Browse files Browse the repository at this point in the history
 - add better error when object config incomplete
 - fix unprefixed metadata allowed outside the root
 - add debugging info with BEAM_WIRE_DEBUG envvar
  • Loading branch information
preaction committed Feb 29, 2016
1 parent 565aaa1 commit 3fbd864
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 14 deletions.
7 changes: 6 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog for Beam-Wire

1.017 2016-02-28T05:43:50
1.018 2016-02-29T01:30:05
- add better error when object config incomplete
- fix unprefixed metadata allowed outside the root
- add debugging info with BEAM_WIRE_DEBUG envvar

1.017 2016-02-28T05:43:50Z
- add bare services
- rewrite and expand the documentation

Expand Down
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ my %WriteMakefileArgs = (
"Test::Lib" => 0,
"Test::More" => "1.001005"
},
"VERSION" => "1.017",
"VERSION" => "1.018",
"test" => {
"TESTS" => "t/*.t t/container/*.t t/dependency/*.t t/deprecated/*.t t/service/*.t"
"TESTS" => "t/*.t t/container/*.t t/dependency/*.t t/deprecated/*.t t/method/*.t t/regression/*.t t/service/*.t"
}
);

Expand Down
23 changes: 18 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,20 @@ dependencies are created first.

=method is_meta

my $is_meta = $wire->is_meta( $ref_hash );
my $is_meta = $wire->is_meta( $ref_hash, $root );

Returns true if the given hash reference describes some kind of
Beam::Wire service. This is used to identify service configuration
hashes inside of larger data structures.

A service hash reference must contain at least one key, and must either
be made completely of meta keys (as returned by L<the get_meta_names
method|/get_meta_names>), or contain a L<prefixed|/meta_prefix> key that
could create or reference an object (one of C<class>, C<extends>,
C<config>, C<value>, or C<ref>);
contain a L<prefixed|/meta_prefix> key that could create or reference an
object (one of C<class>, C<extends>, C<config>, C<value>, or C<ref>) or,
if the C<$root> flag exists, be made completely of unprefixed meta keys
(as returned by L<the get_meta_names method|/get_meta_names>).

The C<$root> flag is used by L<the get method|/get> to allow unprefixed
meta keys in the top-level hash values.

=method get_meta_names

Expand Down Expand Up @@ -438,3 +441,13 @@ Both "value" and "class" or "extends" are defined. These are mutually-exclusive.

=back

=head1 ENVIRONMENT VARIABLES

=over 4

=item BEAM_WIRE_DEBUG

If set, print a bunch of internal debugging information to STDERR.

=back

21 changes: 15 additions & 6 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Beam::Wire - Lightweight Dependency Injection Container

# VERSION

version 1.017
version 1.018

# STATUS

Expand Down Expand Up @@ -316,17 +316,20 @@ dependencies are created first.

## is\_meta

my $is_meta = $wire->is_meta( $ref_hash );
my $is_meta = $wire->is_meta( $ref_hash, $root );

Returns true if the given hash reference describes some kind of
Beam::Wire service. This is used to identify service configuration
hashes inside of larger data structures.

A service hash reference must contain at least one key, and must either
be made completely of meta keys (as returned by [the get\_meta\_names
method](#get_meta_names)), or contain a [prefixed](#meta_prefix) key that
could create or reference an object (one of `class`, `extends`,
`config`, `value`, or `ref`);
contain a [prefixed](#meta_prefix) key that could create or reference an
object (one of `class`, `extends`, `config`, `value`, or `ref`) or,
if the `$root` flag exists, be made completely of unprefixed meta keys
(as returned by [the get\_meta\_names method](#get_meta_names)).

The `$root` flag is used by [the get method](#get) to allow unprefixed
meta keys in the top-level hash values.

## get\_meta\_names

Expand Down Expand Up @@ -439,6 +442,12 @@ The configuration is invalid:

- Both "value" and "class" or "extends" are defined. These are mutually-exclusive.

# ENVIRONMENT VARIABLES

- BEAM\_WIRE\_DEBUG

If set, print a bunch of internal debugging information to STDERR.

# AUTHORS

- Doug Bell <preaction@cpan.org>
Expand Down

0 comments on commit 3fbd864

Please sign in to comment.