Aw
view release on metacpan or search on metacpan
lib/Aw/Event.pm view on Meta::CPAN
}
$self;
}
sub getEnvelope
{
my $result = $_[0]->getField ( "_env" );
(wantarray) ? %{$result} : $result ;
}
sub toHash
{
my $result = Aw::Event::toHashRef ( @_ );
(wantarray) ? %{$result} : $result ;
}
sub getFIELD
{
my $result = {};
$result->{type} = Aw::Event::getFieldType (@_);
$result->{value} = Aw::Event::getField (@_);
( wantarray ) ? %{ $result } : $result ;
}
sub getFieldAndType
{
Aw::Event::getFIELD ( @_ );
}
sub getField
{
my $result = Aw::Event::getFieldRef ( @_ );
if ( wantarray ) {
if ( ref($result) eq "HASH" ) {
return ( %{ $result } );
}
return ( @{ $result } );
}
$result;
}
sub update
{
my $block = shift;
my $struct;
$block =~ s/^\{\n(.*?)\n(\s+)\} //sm;
$struct = "$1";
$struct =~ s/(\w+) (\w+)/ $2 => "$1"/g;
$block =~ s/(\w+)\[\] => \{/$1 => \[/mg;
$block =~ s/(\s+\{\n)(.*?)(\n\s+\})/$1$struct$3/smg;
$block;
}
sub getClientId
{
$_[0]->getStringField ( "_env.pubId" );
}
sub getStructFieldAsHash
{
my $sfEvent = Aw::Event::getStructFieldAsEvent ( @_ );
$sfEvent->toHash;
}
sub getFieldNames
{
my $result = Aw::Event::getFieldNamesRef ( @_ );
( wantarray ) ? @{ $result } : $result ;
}
sub getSequenceField
{
my $result = Aw::Event::getSequenceFieldRef ( @_ );
( wantarray ) ? @{ $result } : $result ;
}
sub getBooleanSeqField
{
my $result = Aw::Event::getBooleanSeqFieldRef ( @_ );
( wantarray ) ? @{ $result } : $result ;
}
sub getByteSeqField
{
my $result = Aw::Event::getByteSeqFieldRef ( @_ );
( wantarray ) ? @{ $result } : $result ;
}
( run in 0.904 second using v1.01-cache-2.11-cpan-39bf76dae61 )