~ubuntu-branches/ubuntu/lucid/libpoe-perl/lucid

« back to all changes in this revision

Viewing changes to lib/POE/Resource/FileHandles.pm

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Yu
  • Date: 2010-01-14 14:11:03 UTC
  • mfrom: (0.1.11 upstream) (3.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100114141103-shobmsuv593kci0w
Tags: 2:1.2840-1
* New upstream release
  + Resolves CPAN RT#53519

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
package POE::Resource::FileHandles;
5
5
 
6
6
use vars qw($VERSION);
7
 
$VERSION = '1.280'; # NOTE - Should be #.### (three decimal places)
 
7
$VERSION = '1.284'; # NOTE - Should be #.### (three decimal places)
8
8
 
9
9
# These methods are folded into POE::Kernel;
10
10
package POE::Kernel;
183
183
### access mode.
184
184
 
185
185
sub _data_handle_enqueue_ready {
186
 
  my ($self, $mode, @filenos) = @_;
 
186
  my ($self, $mode) = splice(@_, 0, 2);
187
187
 
188
188
  my $now = time();
189
 
  foreach my $fileno (@filenos) {
 
189
  foreach my $fileno (@_) {
190
190
    if (ASSERT_DATA) {
191
191
      _trap "internal inconsistency: undefined fileno" unless defined $fileno;
192
192
    }
207
207
    # later dispatch happens.
208
208
    next unless exists $kr_filenos{$fileno};
209
209
 
210
 
    my $kr_fno_rec = $kr_filenos{$fileno}->[$mode];
211
 
 
212
 
    # Gather all the events to emit for this fileno/mode pair.
213
 
 
214
 
    my @selects = map { values %$_ } values %{ $kr_fno_rec->[FMO_SESSIONS] };
215
 
 
216
 
    # Emit them.
217
 
 
218
 
    foreach my $select (@selects) {
 
210
    # Gather and dispatch all the events for this fileno/mode pair.
 
211
 
 
212
    foreach my $select (
 
213
      map { values %$_ }
 
214
      values %{ $kr_filenos{$fileno}[$mode][FMO_SESSIONS] }
 
215
    ) {
219
216
      $self->_dispatch_event(
220
217
        $select->[HSS_SESSION], $select->[HSS_SESSION],
221
218
        $select->[HSS_STATE], ET_SELECT, [