---
name: "HTTP::OAI::Header"
section: "3pm"
platform: "linux"
package: "libhttp-oai-perl"
version: "4.13-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/HTTP::OAI::Header"
---

# HTTP::OAI::Header(3pm)

Encapsulates an OAI header structure

## NAME

HTTP::OAI::Header - Encapsulates an OAI header structure

## SYNOPSIS

```
        use HTTP::OAI::Header;
        my $h = new HTTP::OAI::Header(
                identifier=>'oai:myarchive.org:2233-add',
                datestamp=>'2002-04-12T20:31:00Z',
        );
        $h->setSpec('all:novels');
```

## METHODS

- $h = new HTTP::OAI::Header

  This constructor method returns a new `"HTTP::OAI::Header object"`.

- $h-\>identifier(\[$identifier\])

  Get and optionally set the record OAI identifier.

- $h-\>datestamp(\[$datestamp\])

  Get and optionally set the record datestamp (OAI 2.0+).

- $h-\>status(\[$status\])

  Get and optionally set the record status (valid values are 'deleted' or undef).

- $h-\>**is\_deleted()**

  Returns whether this record's status is deleted.

- @sets = $h-\>setSpec(\[$setSpec\])

  Returns the list of setSpecs and optionally appends a new setSpec `$setSpec` (OAI 2.0+).

- $dom\_fragment = $id-\>**generate()**

  Act as a SAX driver (use `"$h->set_handler()"` to specify the filter to pass events to).
