Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid some deprecation warnings in 5.14.0-RC1

  • Loading branch information...
commit 1a9e37e0cfcb86da05417624d27b917afd31688d 1 parent ea9e828
@doherty authored
View
1  Changes
@@ -1,6 +1,7 @@
Changelog for WWW::Pastebin::Sprunge
{{$NEXT}}
+ * Avoid some deprecation warnings in 5.14.0-RC1
0.005 2011-02-02
* Fix test suite
View
18 lib/WWW/Pastebin/Sprunge/Create.pm
@@ -1,7 +1,7 @@
package WWW::Pastebin::Sprunge::Create;
-# ABSTRACT: create new pastes on sprunge.us
use strict;
use warnings;
+# ABSTRACT: create new pastes on sprunge.us
# VERSION
use Carp;
use URI;
@@ -9,11 +9,11 @@ use LWP::UserAgent;
use HTTP::Request::Common;
use Encode;
use base 'Class::Data::Accessor';
-__PACKAGE__->mk_classaccessors qw(
+__PACKAGE__->mk_classaccessors(qw(
ua
paste_uri
error
-);
+));
use overload q|""| => sub { shift->paste_uri; };
@@ -80,7 +80,7 @@ set to as well as C<agent> argument is set to mimic Firefox.
sub new {
my $class = shift;
- croak "Must have even number of arguments to new()"
+ croak 'Must have even number of arguments to new()'
if @_ & 1;
my %args = @_;
@@ -159,14 +159,14 @@ sub paste {
$self->$_(undef) for qw(paste_uri error);
- defined $text or carp "Undefined paste content" and return;
+ defined $text or carp 'Undefined paste content' and return;
- croak "Must have even number of optional arguments to paste()"
+ croak 'Must have even number of optional arguments to paste()'
if @_ & 1;
my %args = @_;
%args = (
- sprunge => $text,
+ sprunge => $text,
%args,
);
@@ -174,7 +174,7 @@ sub paste {
$args{file}
and not -e $args{sprunge}
- and return $self->_set_error("File $args{'sprunge'} does not seem to exist");
+ and return $self->_set_error("File $args{sprunge} does not seem to exist");
my $ua = $self->ua;
$ua->requests_redirectable( [ ] );
@@ -269,5 +269,3 @@ to C<paste()>.
=cut
1;
-
-__END__
View
5 lib/WWW/Pastebin/Sprunge/Retrieve.pm
@@ -1,14 +1,13 @@
package WWW::Pastebin::Sprunge::Retrieve;
-# ABSTRACT: retrieves pastes from the sprunge.us pastebin
use strict;
use warnings;
+# ABSTRACT: retrieves pastes from the sprunge.us pastebin
# VERSION
use URI;
use Carp;
use LWP::UserAgent;
use Encode;
use base 'Class::Data::Accessor';
-
__PACKAGE__->mk_classaccessors(qw(
ua
uri
@@ -240,5 +239,3 @@ sub content {
}
1;
-
-__END__
Please sign in to comment.
Something went wrong with that request. Please try again.