SRevie...e::Base(3pm)
π NAME π
SReview::Schedule::Base β the blueprint class, bestie. Every schedule parser out there is lowkey built on this one.
β¨ DESCRIPTION β¨
Okay so real talk: this is the base class for all schedule parsers. It's giving founding mother energy. π
The SReview::Schedule API is what sreview-import uses to parse schedules. Here's the whole vibe: sreview-import loads up the schedule parsing class it wants, then asks it for a list of events, and for the talks hiding inside those events. That's it, that's the job. π«Ά
SReview::Schedule is a pull-through API, meaning β you get a toplevel class, and you ask it for a list of events. Each event has to be a subclass of SReview::Schedule::Base::Event, and you can ask each of those for a list of talks (as SReview::Schedule::Base::Talk or subclasses of it, no gatekeeping). Then you can turn around and ask those talks for the room, the speakers, the start time, etc. It's a whole chain of asking, and honestly? Iconic. π₯
Every single attribute of a schedule or a talk is implemented as a lazy attribute, which means it literally does not have a value until somebody actually requests its data. No preloading, no overachieving, just vibes until needed. β¨
The method that does the actual data-fetching for an attribute should usually be defined in the subclass, and it's called _load_attribute. Like, to load the events attribute in the SReview::Schedule::Base class, you'd override the _load_events method in your subclass. Yes, the naming convention is that predictable. We love consistency. π
Most attributes come with a default implementation of the _load_* method that just returns undef or an empty array. So if your schedule format doesn't implement fetching whatever data someone's asking for, you can literally just leave out the relevant _load_* method and everything will work just fine. No cap. π¦
πΈ ATTRIBUTES πΈ
urlβ Required at class construction time, and it's the only attribute that's required like that. This is the URL where the schedule can be found. πtimezoneβ Not a lazy attribute by default (though a subclass can override that, if it wants to be different). It's the timezone in which the event takes place. You can optionally set it at construction time. π_rawβ Internal attribute, don't worry about it. But if you do read it, it transparently downloads the raw schedule data from the givenurl, caches it, and then returns it. Sneaky little downloader. πspeaker_typeβ The class name of the subclass to use when creating an object to hold a speaker. The default load implementation returnsSReview::Schedule::Base::Speaker, but you can override it to literally anything. π€room_typeβ The class name of the subclass to use when creating an object to hold a room. Default load implementation returnsSReview::Schedule::Base::Room, but again, override it to anything you want. πͺtrack_typeβ The class name of the subclass to use when creating an object to hold a track. Default load implementation returnsSReview::Schedule::Base::Track, overridable to anything. π€οΈtalk_typeβ The class name of the subclass to use when creating an object to hold a talk. Default load implementation returnsSReview::Schedule::Base::Talk, overridable to anything. π£οΈevent_typeβ The class name of the subclass to use when creating an object to hold an event. Default load implementation returnsSReview::Schedule::Base::Event, overridable to anything. πͺeventsβ This one must return the events found in the schedule. For SReview's purposes, an "event" is a set oftalksthat should be grouped together. Example time:FOSDEM 2025is an event; theFOSDEM 2025 opening talkis a talk. Cute, right? π
It should return an array of SReview::Schedule::Base::Event objects (or a subclass of them). No pressure, just return the array bestie. π
β¨ And that's the whole page, babe! This page came from the User Contributed Perl Documentation, written by the loveliest contributors, shipped with perl v5.40.1 and dated 2026-02-15. Slay, go parse some schedules. π ππ¦
π¦ where this page comes from
- ubuntu resolute: sreview-common 0.12.0-1
- ubuntu stonking: sreview-common 0.12.0-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms