Help for this page

Select Code to Download


  1. or download this
    our %appdata;
    *appdata = \%SOD::Config::appdata;
    
  2. or download this
    my $planet = SOD::Planet->new($dbh, $some_id);
    my $stats = $planet->game_stats->record;
    
  3. or download this
    $self->{GAMESTATS} ||= SOD::SharedObject::PlanetStatus->new($self->{ID
    +});
    
  4. or download this
    sub new {
       my ($class, $type, $id) = @_;
    ...
       }
       $self;
    }
    
  5. or download this
       unless ($req->send($sock, 'save  ', { 'type'   => $self->{TYPE}, 
                                             'id'     => $self->{ID},
                                             'object' => $self->{RECORD}
                                           })) {
       [...]
    
  6. or download this
    sub send {
       my $self = shift || return 0;
    ...
       }
       1;
    }
    
  7. or download this
    sub receive {
       my $self = shift;                                  # Perl OO mantra
    + ...
    ...
       }
       1;
    }
    
  8. or download this
    eval "_".$req->command;
    
  9. or download this
    sub _save {
       my $cont = $req->content; 
    ...
       }
       [...]
    }
    
  10. or download this
    sub __merge {
       my ($old, $new) = @_;
    ...
    
       $old;
    }