Net::AMQP::Value(3pm)

πŸ’– NAME πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation page for Net::AMQP::Value(3pm) β€” the manual for Net::AMQP::Value, which is literally A collection of classes for typing AMQP data. πŸ’…βœ¨


✨ SYNOPSIS ✨

here’s the whole vibe in code form, no cap:

use Net::AMQP::Value;

# ... somewhere, in an AMQP table:

  Net::AMQP::Value::String->new("1")     # not an integer
  Net::AMQP::Value::Integer->new(" 1")   # not a string
  Net::AMQP::Value::Timestamp->new(1)    # not an integer
  Net::AMQP::Value::Boolean->new(1)      # not an integer
  Net::AMQP::Value::true                 # shorthand for ...Boolean->new(1)
  Net::AMQP::Value::false                # shorthand for ...Boolean->new(0)

🌸 DESCRIPTION 🌸

okay so here’s the tea β˜•: generally in tables, Net::AMQP tries to be smart, so e.g. a table value of '1' or '-1' is transmitted as an integer. when this intelligence becomes a problem, use these classes to type your data. for example, a table value of "Net::AMQP::Value::String-"new(1)> will be transmitted as the string "1". 🫢

these classes also overload the basics like "", 0+, and bool so if you use them outside an AMQP table, they will probably Do The Right Thing. iconic behavior, honestly. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • Net::AMQP
  • Net::AMQP::Common

mwah πŸ’‹ β€” this page is from perl v5.42.0, dated 2016-11-28, and it’s Net::AMQP::Value(3pm). that’s the whole manual, bestie. periodt. πŸŽ€
πŸ“¦ where this page comes from