r54572 - in /branches/upstream/libnet-oauth-perl/current: Build.PL Changes META.yml lib/Net/OAuth.pm lib/Net/OAuth/Message.pm lib/Net/OAuth/Request.pm t/06-factory.t t/11-spec-1.0a.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Mar 19 17:10:03 UTC 2010
Author: jawnsy-guest
Date: Fri Mar 19 17:09:54 2010
New Revision: 54572
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54572
Log:
[svn-upgrade] Integrating new upstream version, libnet-oauth-perl (0.23)
Modified:
branches/upstream/libnet-oauth-perl/current/Build.PL
branches/upstream/libnet-oauth-perl/current/Changes
branches/upstream/libnet-oauth-perl/current/META.yml
branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm
branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Message.pm
branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm
branches/upstream/libnet-oauth-perl/current/t/06-factory.t
branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t
Modified: branches/upstream/libnet-oauth-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/Build.PL?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/Build.PL (original)
+++ branches/upstream/libnet-oauth-perl/current/Build.PL Fri Mar 19 17:09:54 2010
@@ -12,14 +12,15 @@
dist_abstract => 'An implementation of the OAuth protocol',
build_requires => {
'Test::More' => '0.66',
- 'UNIVERSAL::require' => '0.10',
+ },
+ requires => {
'Digest::HMAC_SHA1' => '1.01',
'URI::Escape' => '3.28',
'Class::Accessor' => '0.31',
'Class::Data::Inheritable' => '0.06',
'Digest::SHA1' => '2.12',
'Encode' => '2.35',
- },
+ },
add_to_cleanup => [ 'Net-OAuth-*' ],
create_makefile_pl => 'passthrough',
);
Modified: branches/upstream/libnet-oauth-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/Changes?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/Changes (original)
+++ branches/upstream/libnet-oauth-perl/current/Changes Fri Mar 19 17:09:54 2010
@@ -83,4 +83,11 @@
0.22 Thu, 11 Mar 2010 00:21:26 UTC
Renamed xAuthAccessTokenRequest to XauthAccessTokenRequest for CamelCaseConsistency
Added a couple tests for XauthAccessTokenRequest
-
+
+0.23 Thu, 18 Mar 2010 17:23:36 UTC
+ Removed UNIVERSAL::require dependency
+ Net::OAuth->request constructor now dies if module fails to load (thanks Mike Schleif)
+ Fixed https://rt.cpan.org/Ticket/Display.html?id=55635 Incorrect dependencies (thanks Jens Rehsack)
+ Replaced die() with croak()
+
+
Modified: branches/upstream/libnet-oauth-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/META.yml?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/META.yml (original)
+++ branches/upstream/libnet-oauth-perl/current/META.yml Fri Mar 19 17:09:54 2010
@@ -1,6 +1,6 @@
---
name: Net-OAuth
-version: 0.22
+version: 0.23
author:
- 'Keith Grennan <kgrennan at cpan.org>'
abstract: An implementation of the OAuth protocol
@@ -8,20 +8,20 @@
resources:
license: http://dev.perl.org/licenses/
build_requires:
+ Test::More: 0.66
+requires:
Class::Accessor: 0.31
Class::Data::Inheritable: 0.06
Digest::HMAC_SHA1: 1.01
Digest::SHA1: 2.12
Encode: 2.35
- Test::More: 0.66
- UNIVERSAL::require: 0.10
URI::Escape: 3.28
configure_requires:
Module::Build: 0.35
provides:
Net::OAuth:
file: lib/Net/OAuth.pm
- version: 0.22
+ version: 0.23
Net::OAuth::AccessTokenRequest:
file: lib/Net/OAuth/AccessTokenRequest.pm
Net::OAuth::AccessTokenResponse:
@@ -34,7 +34,7 @@
file: lib/Net/OAuth/ProtectedResourceRequest.pm
Net::OAuth::Request:
file: lib/Net/OAuth/Request.pm
- version: 0.22
+ version: 0.23
Net::OAuth::RequestTokenRequest:
file: lib/Net/OAuth/RequestTokenRequest.pm
Net::OAuth::RequestTokenResponse:
Modified: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm (original)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm Fri Mar 19 17:09:54 2010
@@ -1,14 +1,14 @@
package Net::OAuth;
use warnings;
use strict;
-use UNIVERSAL::require;
+use Carp;
sub PROTOCOL_VERSION_1_0() {1}
sub PROTOCOL_VERSION_1_0A() {1.001}
sub OAUTH_VERSION() {'1.0'}
-our $VERSION = '0.22';
+our $VERSION = '0.23';
our $SKIP_UTF8_DOUBLE_ENCODE_CHECK = 0; # this is not actually used any more
our $PROTOCOL_VERSION = PROTOCOL_VERSION_1_0;
@@ -29,7 +29,7 @@
my $base_class = ref $self || $self;
my $type = camel(shift);
my $class = $base_class . '::' . $type;
- smart_require($class);
+ smart_require($class, 1);
return $class;
}
@@ -48,8 +48,10 @@
sub smart_require {
my $required_class = shift;
+ my $croak_on_error = shift || 0;
unless (exists $ALREADY_REQUIRED{$required_class}) {
- $ALREADY_REQUIRED{$required_class} = $required_class->require;
+ $ALREADY_REQUIRED{$required_class} = eval "require $required_class";
+ croak $@ if $@ and $croak_on_error;
}
return $ALREADY_REQUIRED{$required_class};
}
Modified: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Message.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Message.pm?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Message.pm (original)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Message.pm Fri Mar 19 17:09:54 2010
@@ -6,6 +6,7 @@
use Net::OAuth;
use URI;
use URI::QueryParam;
+use Carp;
use constant OAUTH_PREFIX => 'oauth_';
@@ -85,13 +86,13 @@
my $self = shift;
foreach my $k (@{$self->required_message_params}, @{$self->required_api_params}) {
if (not defined $self->{$k}) {
- die "Missing required parameter '$k'";
+ croak "Missing required parameter '$k'";
}
}
if ($self->{extra_params} and $self->allow_extra_params) {
foreach my $k (keys %{$self->{extra_params}}) {
if ($k =~ $OAUTH_PREFIX_RE) {
- die "Parameter '$k' not allowed in arbitrary params"
+ croak "Parameter '$k' not allowed in arbitrary params"
}
}
}
@@ -101,7 +102,7 @@
my $str = shift;
$str = "" unless defined $str;
if ($str =~ /[\x80-\xFF]/) {
- Net::OAuth::smart_require('Encode');
+ Net::OAuth::smart_require('Encode', 1);
no strict 'subs';
if (Encode::is_utf8($str)) {
# Avoid double-encoding UTF-8.
@@ -182,7 +183,7 @@
my $self = shift;
(my $signature_method = $self->signature_method) =~ s/\W+/_/g;
my $sm_class = 'Net::OAuth::SignatureMethod::' . $signature_method;
- die "Unable to load $signature_method plugin" unless Net::OAuth::smart_require($sm_class);
+ croak "Unable to load $signature_method plugin" unless Net::OAuth::smart_require($sm_class);
return $sm_class;
}
@@ -204,7 +205,7 @@
my $proto = shift;
my $header = shift;
my $class = ref $proto || $proto;
- die "Header must start with \"OAuth \"" unless $header =~ s/OAuth //;
+ croak "Header must start with \"OAuth \"" unless $header =~ s/OAuth //;
my @header = split /[\s]*,[\s]*/, $header;
shift @header if $header[0] =~ /^realm=/i;
return $class->_from_pairs(\@header, @_)
@@ -214,7 +215,7 @@
my $class = shift;
my $pairs = shift;
if (ref $pairs ne 'ARRAY') {
- die 'Expected an array!';
+ croak 'Expected an array!';
}
my %params;
foreach my $pair (@$pairs) {
@@ -233,7 +234,7 @@
my $class = ref $proto || $proto;
my $hash = shift;
if (ref $hash ne 'HASH') {
- die 'Expected a hash!';
+ croak 'Expected a hash!';
}
my %api_params = @_;
# need to do this earlier than Message->new because
@@ -244,7 +245,7 @@
foreach my $k (keys %$hash) {
if ($k =~ s/$OAUTH_PREFIX_RE//) {
if (!grep ($_ eq $k, @{$class->all_message_params})) {
- die "Parameter ". OAUTH_PREFIX ."$k not valid for a message of type $class\n";
+ croak "Parameter ". OAUTH_PREFIX ."$k not valid for a message of type $class";
}
else {
$msg_params{$k} = $hash->{OAUTH_PREFIX . $k};
@@ -252,7 +253,7 @@
}
elsif ($class->is_extension_param($k)) {
if (!grep ($_ eq $k, @{$class->all_message_params})) {
- die "Parameter $k not valid for a message of type $class\n";
+ croak "Parameter $k not valid for a message of type $class";
}
else {
$msg_params{$k} = $hash->{$k};
Modified: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm (original)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm Fri Mar 19 17:09:54 2010
@@ -5,7 +5,7 @@
use URI;
use URI::QueryParam;
-our $VERSION = '0.22';
+our $VERSION = '0.23';
__PACKAGE__->mk_classdata(required_message_params => [qw/
consumer_key
Modified: branches/upstream/libnet-oauth-perl/current/t/06-factory.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/t/06-factory.t?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/t/06-factory.t (original)
+++ branches/upstream/libnet-oauth-perl/current/t/06-factory.t Fri Mar 19 17:09:54 2010
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 12;
BEGIN {
use Net::OAuth;
@@ -92,3 +92,9 @@
is($request->consumer_key, 'foo');
is($request->signature_base_string, 'GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Dfoo%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal');
+
+eval {
+ Net::OAuth->request('Foo Bar');
+};
+
+ok($@, 'should die');
Modified: branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t?rev=54572&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t (original)
+++ branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t Fri Mar 19 17:09:54 2010
@@ -3,6 +3,8 @@
use strict;
use warnings;
use Test::More tests => 28;
+use Carp 'confess';
+$SIG{__DIE__} = \&confess;
BEGIN {
use Net::OAuth;
More information about the Pkg-perl-cvs-commits
mailing list