Changeset 0948fa0f


Ignore:
Timestamp:
Dec 19, 2009, 10:02:56 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
63d9de9
Parents:
22fce654
Message:
End all warn() and die() messages with a newline.

This prevents perl from appending perl script line information, which
looks ugly and is useless to anyone who is not the developer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/BarnOwl/Module/Twitter/Handle.pm

    r5214546 r0948fa0f  
    7878
    7979    my $timeline = eval { $self->{twitter}->home_timeline({count => 1}) };
    80     warn "$@" if $@;
     80    warn "$@\n" if $@;
    8181
    8282    if(!defined($timeline)) {
     
    9292        $self->{last_direct} = $self->{twitter}->direct_messages()->[0]{id};
    9393    };
    94     warn "$@" if $@;
     94    warn "$@\n" if $@;
    9595    $self->{last_direct} = 1 unless defined($self->{last_direct});
    9696
     
    9898        $self->{twitter}->{ua}->timeout(1);
    9999    };
    100     warn "$@" if $@;
     100    warn "$@\n" if $@;
    101101
    102102    return $self;
     
    135135
    136136    my $ratelimit = eval { $self->{twitter}->rate_limit_status };
    137     warn "$@" if $@;
     137    warn "$@\n" if $@;
    138138    unless(defined($ratelimit) && ref($ratelimit) eq 'HASH') {
    139139        # Twitter's just sucking, sleep for 5 minutes
     
    160160
    161161    my $timeline = eval { $self->{twitter}->home_timeline( { since_id => $self->{last_id} } ) };
    162     warn "$@" if $@;
     162    warn "$@\n" if $@;
    163163    unless(defined($timeline) && ref($timeline) eq 'ARRAY') {
    164164        $self->twitter_error();
     
    168168    if ($self->{cfg}->{show_mentions}) {
    169169        my $mentions = eval { $self->{twitter}->mentions( { since_id => $self->{last_id} } ) };
    170         warn "$@" if $@;
     170        warn "$@\n" if $@;
    171171        unless (defined($mentions) && ref($mentions) eq 'ARRAY') {
    172172            $self->twitter_error();
     
    213213
    214214    my $direct = eval { $self->{twitter}->direct_messages( { since_id => $self->{last_direct} } ) };
    215     warn "$@" if $@;
     215    warn "$@\n" if $@;
    216216    unless(defined($direct) && ref($direct) eq 'ARRAY') {
    217217        $self->twitter_error();
Note: See TracChangeset for help on using the changeset viewer.