App::Nopaste::Service::Linode - L<App::Nopaste> interface to L<http://p.linode.com>


App-Nopaste-Service-Linode documentation Contained in the App-Nopaste-Service-Linode distribution.

Index


Code Index:

NAME

Top

App::Nopaste::Service::Linode - App::Nopaste interface to http://p.linode.com

AUTHOR

Top

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE AND COPYRIGHT

Top


App-Nopaste-Service-Linode documentation Contained in the App-Nopaste-Service-Linode distribution.

package App::Nopaste::Service::Linode;
our $VERSION = '0.06';
use strict;
use warnings;
use base 'App::Nopaste::Service::AnyPastebin';

sub uri { "http://p.linode.com" }

sub get {
    my $self = shift;
    my $mech = shift;
    my %args = @_;

    $args{username} ||= 'no';
    $args{password} ||= 'spam';
    
    return $self->SUPER::get($mech => %args);
}

sub post_content {
    my ($self, %args) = @_;

    my $content = $self->SUPER::post_content(%args);

    # On p.linode.com the code2 parameter is called code2z for some
    # reason.
    $content->{code2z} = delete $content->{code2};

    return $content;
}

1;