---
name: "SReview::Talk"
section: "3pm"
platform: "linux"
package: "sreview-common"
version: "0.11.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SReview::Talk"
---

# SReview::Talk(3pm)

Database abstraction for talks in the SReview database

## NAME

SReview::Talk - Database abstraction for talks in the SReview database

## SYNOPSIS

```
  use SReview::Talk;
  my $talk = SReview::Talk->new(talkid => 1);
  print $talk->nonce;
  my $nonce = $talk->nonce;
  my $talk_alt = SReview::Talk->by_nonce($nonce);
  print $talk_alt->talkid; # 1
  $talk->add_correction(length_adj => 1);
  $talk->done_correcting;
```

## DESCRIPTION

SReview::Talk provides a (Moose-based) object-oriented interface to the data related to a talk that is stored in the SReview database. Although it is not yet used everywhere, the intention is for it to eventually replace all the direct PostgreSQL calls.

## PROPERTIES

### talkid

The unique ID of the talk. Required attribute at construction time (but see the `"by_nonce"` method, below). Is used to look up the relevant data in the database.

### pathinfo

Helper property to look up information from the database. Should not be used directly.

### flags

Flags set on this talk. Setter: `"set_flag"`; getter: `"get_flag"`. Flags can be deleted with `"delete_flag"`.

### apology

The apology note, if any. Predicate: `"has_apology"`.

### comment

The comments that the user entered in the "other brokenness" field. Predicate: `"has_comment"`; clearer: `"clear_comment"`.

### first\_comment

The most recent comment entered in the "other brokenness" field.

### corrected\_times

The start- and endtime of the talk, with corrections (if any) applied.

### nonce

The talk's unique hex string, used to look it up for review.

### date

The date on which the talk happened

### readable\_date

The date on which the talk happened, in a (somewhat) more human-readable format than the `"date"` property.

### eventname

The name of the event of which this talk is part

### event\_output

The name of the event as used in output directories, if any.

### progress

The current progress value of the talk, as an SReview::Talk::Progress

### state

The current state of the talk, as an SReview::Talk::State

### title

The title of the talk

### subtitle

The subtitle of the talk

### workdir

The working directory where the files for this talk should be stored

### relative\_name

The relative path- and file name under the output directory for this talk.

### outname

The output name for this talk

### finaldir

The directory in which things are stored

### slug

A short, safe representation of the talk; used for filenames.

### corrections

The corrections that are set on this talk.

Supports:

- has\_correction

  check whether a correction exists (by name)

- set\_correction

  Overwrite a correction with a new value

- clear\_correction

  Remove a correction from the set of corrections

- correction\_pairs

  Get a key/value list of corrections

### video\_fragments

Gets a list of hashes with data on the fragments of video files that are necessary to build the talk, given the schedule and the current corrections.

Each hash contains:

- talkid

  The talk ID for fragments that are part of the main video; -1 for fragments that are part of the pre video; and -2 for fragments that are part of the post video.

- rawid

  The unique ID of the raw file

- raw\_filename

  The filename of the raw file

- fragment\_start

  The offset into the raw file where the interesting content begins.

- raw\_length

  The length of the entire video (should be the same for each fragment)

- raw\_length\_corrected

  The length of the interesting content in *this* raw file

### avs\_video\_fragments

The same values as the video\_fragments attribute, but with every length extended as needed for A/V sync operations.

### speakers

The names of the speakers as a single string, in the format 'Firstname Lastname, Firstname Lastname, ..., Firstname Lastname and Firstname Lastname'

### speakerlist

An array of speaker names

### room

The room in which the talk happened/will happen

### roomid

The unique ID of the room

### eventurl

The URL for the talk on the event's website. Only contains data if `$eventurl_format` is set in the config file; if it doesn't, returns the empty string.

### output\_video\_urls

An array of URLs for the output videos, as they will be published. Used by final review.

### preview\_exten

The file extension of the preview file (.webm or .mp4)

### scheduled\_length

The length of the talk, as scheduled

## METHODS

### by\_nonce

Looks up (and returns) the talk by nonce, rather than by talk ID

### by\_slug

Looks up (and returns) the talk by slug, rather than by talk ID

### add\_correction

Interpret a correction as a number, and add the passed parameter to it. The new value of the correction will be the sum of the parameter and the old correction.

### done\_correcting

Commit the created corrections to the database. Also commits other things, like the comment and the flags.

### set\_state

Override the state of the talk to a new state, ignoring the state transitions. Note, does not update the object, so this should be done just before destroying it.

### state\_done

Set the progress to "done" in the given state. Does nothing if the talk has since moved to another state.

### reset\_corrections

Clear all corrections, except the serial one. Used when a user requests that the talk be reset to default.
