SReview::Talk(3pm) | User Contributed Perl Documentation | SReview::Talk(3pm) |
SReview::Talk - Database abstraction for talks in the SReview database
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;
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.
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.
Helper property to look up information from the database. Should not be used directly.
Flags set on this talk. Setter: "set_flag"; getter: "get_flag". Flags can be deleted with "delete_flag".
The apology note, if any. Predicate: "has_apology".
The comments that the user entered in the "other brokenness" field. Predicate: "has_comment"; clearer: "clear_comment".
The start- and endtime of the talk, with corrections (if any) applied.
The talk's unique hex string, used to look it up for review.
The date on which the talk happened
The date on which the talk happened, in a (somewhat) more human-readable format than the "date" property.
The name of the event of which this talk is part
The name of the event as used in output directories, if any.
The current state of the talk, as an SReview::Talk::State
The title of the talk
The subtitle of the talk
The working directory where the files for this talk should be stored
The relative path- and file name under the output directory for this talk.
The output name for this talk
The directory in which things are stored
A short, safe representation of the talk; used for filenames.
The corrections that are set on this talk.
Supports:
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:
The same values as the video_fragments attribute, but with every length extended as needed for A/V sync operations.
The names of the speakers as a single string, in the format 'Firstname Lastname, Firstname Lastname, ..., Firstname Lastname and Firstname Lastname'
An array of speaker names
The room in which the talk happened/will happen
The unique ID of the room
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.
An array of URLs for the output videos, as they will be published. Used by final review.
The file extension of the preview file (.webm or .mp4)
The length of the talk, as scheduled
Looks up (and returns) the talk by nonce, rather than by talk ID
Looks up (and returns) the talk by slug, rather than by talk ID
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.
Commit the created corrections to the database. Also commits other things, like the comment and the flags.
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.
Set the progress to "done" in the given state. Does nothing if the talk has since moved to another state.
Clear all corrections, except the serial one. Used when a user requests that the talk be reset to default.
2022-12-14 | perl v5.36.0 |