Changeset d689fc7


Ignore:
Timestamp:
Dec 10, 2008, 1:20:11 PM (16 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
1f82df9
Parents:
51a7fc5
Message:
Fix an "undefined" warning
File:
1 edited

Legend:

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

    r51a7fc5 rd689fc7  
    3535}
    3636
    37 # Don't redefine variables if they already exist
    38 # This is a workaround for http://barnowl.mit.edu/trac/ticket/44
    39 # Which was fixed in svn r819
    40 if((BarnOwl::getvar('twitter:class')||'') eq '') {
    41     my $desc = <<'END_DESC';
     37my $desc = <<'END_DESC';
    4238BarnOwl::Module::Twitter will watch for authentic zephyrs to
    4339-c $twitter:class -i $twitter:instance -O $twitter:opcode
     
    4743messages with any value of that field.
    4844END_DESC
    49     BarnOwl::new_variable_string('twitter:class',
    50                                {
    51                                    default => $class,
    52                                    summary => 'Class to watch for Twitter messages',
    53                                    description => $desc
    54                                   });
    55     BarnOwl::new_variable_string('twitter:instance',
    56                                {
    57                                    default => $instance,
    58                                    summary => 'Instance on twitter:class to watch for Twitter messages.',
    59                                    description => $desc
    60                                   });
    61     BarnOwl::new_variable_string('twitter:opcode',
    62                                {
    63                                    default => $opcode,
    64                                    summary => 'Opcode for zephyrs that will be sent as twitter updates',
    65                                    description => $desc
    66                                   });
     45BarnOwl::new_variable_string(
     46    'twitter:class',
     47    {
     48        default     => $class,
     49        summary     => 'Class to watch for Twitter messages',
     50        description => $desc
     51    }
     52);
     53BarnOwl::new_variable_string(
     54    'twitter:instance',
     55    {
     56        default => $instance,
     57        summary => 'Instance on twitter:class to watch for Twitter messages.',
     58        description => $desc
     59    }
     60);
     61BarnOwl::new_variable_string(
     62    'twitter:opcode',
     63    {
     64        default => $opcode,
     65        summary => 'Opcode for zephyrs that will be sent as twitter updates',
     66        description => $desc
     67    }
     68);
    6769}
    6870
     
    135137                direction => 'in',
    136138                source    => decode_entities($tweet->{source}),
    137                 location  => decode_entities($tweet->{user}{location}) || "",
     139                location  => decode_entities($tweet->{user}{location}||""),
    138140                body      => decode_entities($tweet->{text})
    139141               );
Note: See TracChangeset for help on using the changeset viewer.