[ 
https://issues.apache.org/jira/browse/PROTON-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14166727#comment-14166727
 ] 

ASF subversion and git services commented on PROTON-582:
--------------------------------------------------------

Commit 1630783 from [~gsim] in branch 'proton/branches/examples'
[ https://svn.apache.org/r1630783 ]

PROTON-582: Perl Message can infer the type of the content provided.

The qpid::proton::Message->set_body() method can take either a single
argument (the body) or two arguments (the body and an explicit type).

Previous, if the second argument wasn't provided, the code assumed it
was a qpid::message::STRING type.

Now, the code will attempt to determine the type of the argument. It can
successfully infer a hash, array, int and string. It will default to a
string if it cannot otherwise determine the type.

> Perl language bindings do not properly identify integers from strings when 
> encoding
> -----------------------------------------------------------------------------------
>
>                 Key: PROTON-582
>                 URL: https://issues.apache.org/jira/browse/PROTON-582
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: perl-binding
>    Affects Versions: 0.7
>            Reporter: Darryl L. Pierce
>            Assignee: Darryl L. Pierce
>             Fix For: 0.8
>
>
> Rafi found the code:
>   sub isnum ($) {
>       return 0 if $_[0] eq '';
>       $_[0] ^ $_[0] ? 0 : 1
>   }
> which can differentiate strings from integers. An additional piece can check 
> for a . in a numeric value to differentiate integers from floating point 
> values.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to