table of contents
| SReview::Schedule::Base(3pm) | User Contributed Perl Documentation | SReview::Schedule::Base(3pm) |
NAME¶
SReview::Schedule::Base
DESCRIPTION¶
Base class for all schedule parsers.
The "SReview::Schedule" API is used by sreview-import in order to parse schedules. sreview-import will load the desired schedule parsing class, and ask it for a list of events and talks within those events.
SReview::Schedule is a pull-through API; that is, you get a toplevel class, which you can ask for a list of events. Each event must be a subclass of the "SReview::Schedule::Base::Event", which can be asked for a list of talks (as "SReview::Schedule::Base::Talk" or subclasses of that). These can then in turn be asked for the room, the speakers, the start time, etc.
All attributes of a schedule or a talk are implemented as lazy attributes; that is, they don't have a value until a request is made for their data. The method that implements fetching the data for a method should usually be defined the subclass, as a method called "_load_"attribute; e.g., to load the "events" attribute in the "SReview::Schedule::Base" class, the "_load_events" method should be overridden in the subclass.
Most attributes have a default implementation of the "_load_*" method that returns "undef" or an empty array, so if your schedule format does not implement fetching the requested data, you can leave out the relevant "_load_*" method and everything will work just fine.
ATTRIBUTES¶
- url
- Required at class construction time; the only attribute so required. The URL where the schedule can be found.
- timezone
- Not a lazy attribute by default (can be overridden by a subclass though). The timezone in which the event takes place. Can optionally be set at construction time.
- _raw
- Internal attribute. If read, transparently downloads (and caches), then returns, the raw schedule data from the given "url".
- speaker_type
- The class name of the subclass to be used when creating an object to hold a speaker. Default load implementation returns "SReview::Schedule::Base::Speaker", but can be overridden to anything.
- room_type
- The class name of the subclass to be used when creating an object to hold a room. Default load implementation returns "SReview::Schedule::Base::Room", but can be overridden to anything.
- track_type
- The class name of the subclass to be used when creating an object to hold a track. Default load implementation returns "SReview::Schedule::Base::Track", but can be overridden to anything.
- talk_type
- The class name of the subclass to be used when creating an object to hold a talk. Default load implementation returns "SReview::Schedule::Base::Talk", but can be overridden to anything.
- event_type
- The class name of the subclass to be used when creating an object to hold an event. Default load implementation returns "SReview::Schedule::Base::Event", but can be overridden to anything.
- events
- Must return the events found in the schedule. For the purpose of SReview,
an "event" is a set of "talks" that should be grouped
together. For instance, "FOSDEM 2025" is an event; the
"FOSDEM 2025 opening talk" is a talk.
Should return an array of "SReview::Schedule::Base::Event" objects (or a subclass of them).
| 2026-02-15 | perl v5.40.1 |