App::MojoSlides::Slides - Slide organizer for App::MojoSlides
my $slides = App::MojoSlides::Slides->new( list => ['beginning', 'middle', 'end'], ); -- or -- my $slides = App::MojoSlides::Slides->new( last => 10, );
This little class eases some of the organization of slides for App::MojoSlides. You probably don't need to invoke this directly. However, your presentation configuration will contain a
slides key, so you might still want to know about it.
Specifically, you will likely need either
last attributes. If you provide a
list, these are the template names which map to slide
n is the index in the arraref. If you instead provide a
last attribute, it will assume your templates are named
App::MojoSlides::Slides->new(2)->last # 2 App::MojoSlides::Slides->new($arrayref)->list # $arrayref
Since nearly every instance of this class will need either a
list initialization, the constructor will take a single scalar or arrayrefence as inialization of those attributes respectively.
The ordinal number of the first slide. Defaults to 1, as it should.
The ordinal number of the last slide. Defaults to the number of items in
listor else 1.
An arrayref of slide names in order. Optional. If missing your slides should be numbered numerically from
These methods are used in the MojoSlide system and you probably don't need to use them. Still they exist.
Called with the current slide number and returns the slide number before it, or else
firstif you are at it.
Called with the current slide number and returns the slide number after it, or else
lastif you are at it.
Takes an ordinal number (
n) and if
listis defined, returns the
n-1th item, or else it returns the stringified number you passed in.