Hessian-Translator
view release on metacpan or search on metacpan
lib/Hessian/Deserializer.pm view on Meta::CPAN
sub next_token { #{{{
my $self = shift;
return $self->deserialize_message();
}
sub process_message { #{{{
my $self = shift;
my $tokens;
while ( my $token = $self->deserialize_message()) { #next_token() ) {
if ( ( ref $token ) eq 'HASH' ) {
my @token_keys = keys %{$token};
@{$tokens}{@token_keys} = @{$token}{@token_keys};
}
else {
$tokens = $token;
}
}
return $tokens;
}
"one, but we're not the same";
__END__
=head1 NAME
Hessian::Deserializer - Add deserialization capabilities to processor.
=head1 VERSION
=head1 SYNOPSIS
=head1 DESCRIPTION
=head1 INTERFACE
=head2 deserialize_data
Deserialize a single chunk from the file handle. Note that this only processes
the composite and basic datastructures and cannot handle I<call>, I<packet> or
I<envelope> level chunks.
=head2 deserialize_message
Similar to C<deserialize_data> except that it also processes I<envelope> level
chunks of the message.
=head2 next_token
Iterate to the next chunk in the input handle.
=head2 process_message
Process a complete Hessian message by reading chunk by chunk until reaching
the end of the input filehandle. The deserialized message is currently
returned in an array reference, although this is likely to change in future
iterations. The contents of this array reference depend on the data that is
parsed from the Hessian message.
( run in 0.946 second using v1.01-cache-2.11-cpan-71847e10f99 )