/[Frey]/trunk/lib/Frey/Server.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Server.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 189 by dpavlin, Tue Sep 9 23:15:46 2008 UTC revision 190 by dpavlin, Sun Sep 14 00:45:47 2008 UTC
# Line 8  use Continuity; Line 8  use Continuity;
8  #use Continuity::REPL;  #use Continuity::REPL;
9  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
10    
11  use Carp::REPL;  #use Carp::REPL; ## XXX it would be nice, but it breaks error reporting too much
12  use Frey::ClassLoader;  use Frey::ClassLoader;
13    
14  my @messages;    # Global (shared) list of messages  my @messages;    # Global (shared) list of messages
# Line 56  documented only in source code. Line 56  documented only in source code.
56    
57  sub main {  sub main {
58          my ($req) = @_;          my ($req) = @_;
59      
60          my $path = $req->request->url->path;          my $path = $req->request->url->path;
61          warn "REQUEST: $path ",dump( $req->params ),"\n";          warn "REQUEST: $path ",dump( $req->params ),"\n";
62    
# Line 84  sub main { Line 84  sub main {
84    
85          };          };
86    
87            my $self = $req;
88    
89          if ( $@ ) {          if ( $@ ) {
90                  warn $@;                  warn $@;
91                  #$req->conn->send_error( 404 ); # FIXME this should probably be 500, but we can't ship page with it                  #$req->conn->send_error( 404 ); # FIXME this should probably be 500, but we can't ship page with it
92                  $req->print( qq{<pre class="error">$@<pre>} );                  $req->print( qq{<pre class="error">$@<pre>} );
93                  Carp::REPL::repl;       # FIXME if $self->debug  #               Carp::REPL::repl;
94    
95          }          }
96    
# Line 97  sub main { Line 99  sub main {
99                  pushstream($req);                  pushstream($req);
100          }          }
101    
         if ( $path =~ m/die/ ) {  
                 Carp::REPL::repl;       # FIXME if $self->debug  
         }  
   
102          # If they are sending us a message, we give them a thread for that too          # If they are sending us a message, we give them a thread for that too
103          if($path =~ /sendmessage/) {          if($path =~ /sendmessage/) {
104                  send_message($req);                  send_message($req);

Legend:
Removed from v.189  
changed lines
  Added in v.190

  ViewVC Help
Powered by ViewVC 1.1.26