Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/usr/share/perl5/vendor_perl/X10/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/share/perl5/vendor_perl/X10/EventList.pm
# Copyright (c) 1999-2017 Rob Fugina <robf@fugina.com>
# Distributed under the terms of the GNU Public License, Version 3.0

package X10::EventList;

use vars qw(@ISA);

use Storable;

@ISA = qw(Storable);

use strict;

sub new
{
   my $type = shift;

   my $self = bless { list => [] }, $type;

   foreach (@_)
   {
      if (ref $_ eq 'X10::Event')
      {
         push @{$self->{list}}, $_;
      }
      elsif (ref $_ eq 'X10::EventList')
      {
         push @{$self->{list}}, $_->list;
      }
      elsif (ref $_ eq '')
      {
         push @{$self->{list}}, new X10::Event($_);
      }
      else
      {
         warn "Can't deal with a ", ref $_;
      }
   }

   @{$self->{list}} = grep { $_ } @{$self->{list}};

   return undef unless @{$self->{list}};

   return $self;
}

sub as_string
{
   my $self = shift;

   join(', ', map { $_->as_string } @{$self->{list}});
}

sub list
{
   my $self = shift;
   @{$self->{list}};
}

###

# build a string of words that implement this event
sub compile
{
   my $self = shift;

   map { $_->compile } @{$self->{list}};
}


###


1;


Hry