---
name: "Net::Stomp::Frame"
section: "3pm"
platform: "linux"
package: "libnet-stomp-perl"
version: "0.62-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net::Stomp::Frame"
---

# Net::Stomp::Frame(3pm)

A STOMP Frame

## NAME

Net::Stomp::Frame - A STOMP Frame

## SYNOPSIS

```
  use Net::Stomp::Frame;
  my $frame = Net::Stomp::Frame->new( {
    command => $command,
    headers => $headers,
    body    => $body,
  } );
  my $frame  = Net::Stomp::Frame->parse($string);
  my $string = $frame->as_string;
```

## DESCRIPTION

This module encapulates a Stomp frame.

A Stomp frame consists of a command, a series of headers and a body.

For details on the protocol see \<https://stomp.github.io/\>.

## METHODS

### new

Create a new Net::Stomp::Frame object:

```
  my $frame = Net::Stomp::Frame->new( {
    command => $command,
    headers => $headers,
    body    => $body,
  } );
```

### parse

Create a new Net::Somp::Frame given a string containing the serialised frame:

```
  my $frame  = Net::Stomp::Frame->parse($string);
```

### as\_string

Create a string containing the serialised frame representing the frame:

```
  my $string = $frame->as_string;
```

### command

Get or set the frame command.

### body

Get or set the frame body.

### headers

Get or set the frame headers, as a hashref. All following methods are just shortcuts into this hashref.

### destination

Get or set the `"destination"` header.

### content\_type

Get or set the `"content-type"` header.

### content\_length

Get or set the `"content-length"` header.

### exchange

Get or set the `"exchange"` header.

### message\_id

Get or set the `"message-id"` header.

### reply\_to

Get or set the `"reply-to"` header.

## SEE ALSO

Net::Stomp.

## AUTHOR

Leon Brocard \<acme@astray.com\>.

## CONTRIBUTORS

Gianni Ceccarelli \<dakkar@thenautilus.net\>

## COPYRIGHT

Copyright (C) 2006, Leon Brocard

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
