Changeset 36 for server/trunk/web/lib/Sophie/Model
- Timestamp:
- 11/25/10 03:34:05 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Model/Chat.pm
r35 r36 2 2 use Moose; 3 3 use namespace::autoclean; 4 use Getopt::Long; 5 use Text::ParseWords; 4 6 5 7 extends 'Catalyst::Model'; … … 31 33 }, 32 34 t => { 33 code => sub { $_[0]->forward('/distrib/list') }, 35 code => sub { 36 my ($c, $context, @args) = @_; 37 local @ARGV = @args; 38 join(', ', @{ $_[0]->forward('/distrib/list', [ { 39 distribution => $args[0], 40 release => $args[1], 41 arch => $args[2], 42 }, ] 43 ) });; 44 }, 34 45 }, 35 46 }; 36 47 37 48 sub process { 38 my ( $self, $c, $context, $ cmd, @args) = @_;49 my ( $self, $c, $context, $message) = @_; 39 50 40 warn keys %$context;51 my ($cmd, @args) = Text::ParseWords::shellwords($message); 41 52 42 53 my $msg;
Note: See TracChangeset
for help on using the changeset viewer.