Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 API for Perl Documentation | 2025.1

# Class P4::OutputHandler

## Description

The `P4::OutputHandler` class provides access to streaming output from the server. After defining the output handler, call `P4::SetHandler()` with your implementation of `P4::OutputHandler`.

Because P4 API for Perl does not provide a template or superclass, your output handler must implement all five of the following methods: `OutputMessage()`, `OutputText()`, `OutputInfo()`, `OutputBinary()`, and `OutputStat()`, even if the implementation consists of trivially returning `0` (report only: don’t handle output, don’t cancel operation).

These methods must return one of the following four values:

Value | Meaning
--- | ---
`0` | Messages added to output (don’t handle, don’t cancel).
`1` | Output is handled by class (don’t add message to output).
`2` | Operation is marked for cancel, message is added to output.
`3` | Operation is marked for cancel, message not added to output.

## Class Methods

None.

## Instance Methods

### $handler.OutputBinary() -> int

Process binary data.

### $handler.OutputInfo() -> int

Process tabular data.

### $handler.OutputMessage() -> int

Process informational or error messages.

### $handler.OutputStat()-> int

Process tagged data.

### $handler.OutputText() -> int

Process text data.

Your search for returned results