Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a more accurately-named alias: Acme::Noose
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package Acme::Noose; | ||
use strict; | ||
use warnings; | ||
# ABSTRACT: just enough object orientation to hang yourself | ||
# VERSION | ||
|
||
use Noose (); | ||
BEGIN { | ||
*Acme::Noose:: = \%Noose::; | ||
} | ||
|
||
=head1 DESCRIPTION | ||
This is simply a (more accurately named) alias of L<Noose>. | ||
=for Pod::Coverage new | ||
=cut | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use strict; | ||
use warnings; | ||
|
||
package Thing; | ||
use Acme::Noose; | ||
sub exclaim { | ||
my $self = shift; | ||
die 'BLARGH' unless $self->a == 1; | ||
return "yepyepyep\n"; | ||
} | ||
|
||
package main; | ||
use Test::More tests => 4; | ||
|
||
my $thing = new_ok Thing => [a => 1]; | ||
can_ok $thing, qw/ new exclaim a /; | ||
is $thing->a => 1; | ||
is $thing->exclaim => "yepyepyep\n"; | ||
|