Changeset 8395 for lang/perl/plagger

Show
Ignore:
Timestamp:
03/26/08 15:38:33 (8 months ago)
Author:
mattn
Message:

lang/perl/plagger/lib/Plagger/Plugin/Publish/Diigo.pm:
fixed tabs to spaces. X-(

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/plagger/lib/Plagger/Plugin/Publish/Diigo.pm

    r8394 r8395  
    1919sub initialize { 
    2020    my $self = shift; 
    21         unless ($self->{mech}) { 
    22                 my $mech = Plagger::Mechanize->new; 
    23                 $mech->agent_alias('Windows Mozilla'); 
    24                 $mech->quiet(1); 
    25                 $self->{mech} = $mech; 
    26         } 
     21    unless ($self->{mech}) { 
     22        my $mech = Plagger::Mechanize->new; 
     23        $mech->agent_alias('Windows Mozilla'); 
     24        $mech->quiet(1); 
     25        $self->{mech} = $mech; 
     26    } 
    2727    $self->login_diigo; 
    2828} 
     
    4141 
    4242    my $body = JSON::Syck::Dump({ 
    43                 title       => encode('utf-8', $args->{entry}->title), 
    44                 description => $summary || '', 
    45                 tags        => $tag_string, 
    46                 url         => encode('utf-8', $args->{entry}->link), 
    47                 mode        => ($self->conf->{default_public} ? '0' : '2'), 
    48         }); 
     43        title       => encode('utf-8', $args->{entry}->title), 
     44        description => $summary || '', 
     45        tags        => $tag_string, 
     46        url         => encode('utf-8', $args->{entry}->link), 
     47        mode        => ($self->conf->{default_public} ? '0' : '2'), 
     48    }); 
    4949 
    5050    my $uri = URI->new('http://preview.diigo.com/bookmarklet2'); 
    51         $uri->query_form( 
    52                 cmd  => 'bm_saveBookmark', 
    53                 json => $body, 
    54                 v    => 11, 
    55         ); 
    56         my $res = eval { $self->{mech}->get($uri->as_string) }; 
    57         if (!$res || !$res->is_success) { 
    58                 $context->log(info => "can't submit: " . $args->{entry}->link); 
    59         } else { 
    60                 $context->log(info => "Post entry success."); 
    61         } 
     51    $uri->query_form( 
     52        cmd  => 'bm_saveBookmark', 
     53        json => $body, 
     54        v    => 11, 
     55    ); 
     56    my $res = eval { $self->{mech}->get($uri->as_string) }; 
     57    if (!$res || !$res->is_success) { 
     58        $context->log(info => "can't submit: " . $args->{entry}->link); 
     59    } else { 
     60        $context->log(info => "Post entry success."); 
     61    } 
    6262  
    6363    my $sleeping_time = $self->conf->{interval} || 3;