Browse files

Tired of Moo breaking things. Switching to Moose.

  • Loading branch information...
1 parent c15de87 commit 65c0b6fb9121437582f7cddfef77377e8b6166f7 @ironcamel committed Jul 2, 2012
Showing with 11 additions and 13 deletions.
  1. +3 −0 Changes
  2. +2 −2 dist.ini
  3. +2 −7 lib/Net/OpenStack/Compute.pm
  4. +1 −1 lib/Net/OpenStack/Compute/AuthRole.pm
  5. +3 −3 t/01-basic.t
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for Net-OpenStack-Compute
+1.1002 2012-07-02
+ Tired of Moo breaking things. Switching to Moose.
+
1.1001 2012-05-26
Don't use an array ref with around, which Moo doesn't seem to like.
Thanks Jonathan "Duke" Leto (https://github.com/leto).
View
4 dist.ini
@@ -4,15 +4,15 @@ license = Perl_5
copyright_holder = Naveed Massjouni
copyright_year = 2011
-version = 1.1001
+version = 1.1002
[Prereqs]
App::Rad = 0
App::Rad::Plugin::MoreHelp = 0
HTTP::Request = 0
JSON = 0
LWP = 0
-Moo = 0.091007
+Moose = 0
Pod::Select = 0
Test::Most = 0
View
9 lib/Net/OpenStack/Compute.pm
@@ -1,13 +1,12 @@
package Net::OpenStack::Compute;
-use Moo;
+use Moose;
# VERSION
use Carp;
use HTTP::Request;
use JSON qw(from_json to_json);
use LWP;
-#use Net::OpenStack::Compute::Auth;
has auth_url => (is => 'rw', required => 1);
has user => (is => 'ro', required => 1);
@@ -244,7 +243,7 @@ sub _check_res {
return 1;
}
-my $around_sub = sub {
+around qw( _get _post _delete ) => sub {
my $orig = shift;
my $self = shift;
my $res = $self->$orig(@_);
@@ -253,10 +252,6 @@ my $around_sub = sub {
};
-for my $s (qw( _get _post _delete )) {
- around $s => $around_sub;
-}
-
# ABSTRACT: Bindings for the OpenStack Compute API.
=head1 SYNOPSIS
View
2 lib/Net/OpenStack/Compute/AuthRole.pm
@@ -1,5 +1,5 @@
package Net::OpenStack::Compute::AuthRole;
-use Moo::Role;
+use Moose::Role;
use JSON qw(from_json to_json);
View
6 t/01-basic.t
@@ -4,19 +4,19 @@ use Net::OpenStack::Compute;
throws_ok(
sub { Net::OpenStack::Compute->new },
- qr/Missing required arguments/,
+ qr(Attribute \S+ is required),
'instantiation with no argument throws an exception'
);
throws_ok(
sub { Net::OpenStack::Compute->new( auth_url => 'foo' ) },
- qr/Missing required arguments/,
+ qr(Attribute \S+ is required),
'instantiation with only auth_url argument throws an exception'
);
throws_ok(
sub { Net::OpenStack::Compute->new( auth_url => 'foo', user => 'bar' ) },
- qr/Missing required arguments/,
+ qr(Attribute \S+ is required),
'instantiation with only auth_url, user arguments throws an exception'
);

0 comments on commit 65c0b6f

Please sign in to comment.