The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Slides::SlideTracker - track transitions around a slide show.

VERSION

This document describes WWW::Slides::SlideTracker version 0.0.3

SYNOPSIS

    use WWW::Slides::SlideTracker;

    my $tracker = WWW::Slides::SlideTracker->new(
      slide_show => $slide_show,  # e.g. WWW::Slides::SlideShow
      current    => 2,            # starting slide
    );

    my $current_id = $tracker->current();
    my $current_id = $tracker->get_current(); # alias
    $tracker->goto(3);

    my $next_id = $tracker->get_next();
    $tracker->goto_next();

    my $previous_id = $tracker->get_next();
    $tracker->goto_previous();

    my $first_id = $tracker->get_next();
    $tracker->goto_first();

    my $last_id = $tracker->get_next();
    $tracker->goto_last();

    $tracker->mark_current();    # set current slide as marked
    print 'unserved' if $tracker->current_still_unserved();
    print 'served' if $tracker->already_served_current();
    
  

DESCRIPTION

This module is generally not meant for usage outside WWW::Slides::Talk or WWW::Slides::Attendee. Changes without notice are possible albeit not much probable.

Slides can be marked for later reference. This is useful, for example, to track which slides have been already sent to a given Attendee, in order to avoid re-sending of the slide's data (which could also make a mess putting two divs with the same id-s).

The method names are pretty self-explanatory.

INTERFACE

There are four main groups of methods:

  • constructor;

  • slide marking management;

  • slide transition peeking;

  • slide transition actuation.

Constructor

The constructor method is named new and accepts the following arguments:

slide_show (mandatory)

any WWW::Slides::SlideShow interface compliant object.

current (optional)

the slide where the tracker should be set first. Defaults to the slide id given back as id_first() from the slide_show object described above.

Slide Marking Management

This group can handle a mark for each slide, setting the mark and retrieving the mark status. Note that at the moment there is no way to un-mark a slide.

There are three methods in this area:

mark_current()

Set a mark on the current slide.

already_served_current()

True if there is a mark on the current slide, false otherwise.

current_still_unserved()

True if the current slide has no mark, false otherwise. This is the exact negation of already_served_current(), just syntactic sugar.

Slide Transition Peeking

These methods allow to peek which slide would be set after a given transition. These are also the functions internally used by the "Slide Transition Actuation" functions decribed in the next paragraph.

There are five methods in this area:

current() or get_current()
get_first()
get_last()
get_previous()
get_next()

Names are sufficiently self-explanatory. Note that previous and next are intended with respect to the current slide.

Slide Transition Actuation

These methods allow the tracker to make a transition to a given slide. Note that a transition does NOT mean that the slide will be marked, you have to call the marking methods explicitly.

These are the methods in this area:

goto($slide_no)

Goto the given $slide_no. Consistency check will be on for this method (as opposed to set_current(), see below), for this reason this is the suggested method to use.

set_current($slide_no)

Goto the given $slide_no. No consistency check will be done for this. Use goto(), it's more robust.

goto_first()
goto_last()
goto_previous()
goto_next()

Names are sufficiently self-explanatory. Note that previous and next are intended with respect to the current slide.

DIAGNOSTICS

Shouldn't balk at you.

CONFIGURATION AND ENVIRONMENT

WWW::Slides::SlideTracker requires no configuration files or environment variables.

DEPENDENCIES

Object::InsideOut.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests through http://rt.cpan.org/

AUTHOR

Flavio Poletti <flavio [at] polettix [dot] it>

LICENCE AND COPYRIGHT

Copyright (c) 2007, Flavio Poletti <flavio [at] polettix [dot] it>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic and perlgpl.

Questo modulo è software libero: potete ridistribuirlo e/o modificarlo negli stessi termini di Perl stesso. Vedete anche perlartistic e perlgpl.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

NEGAZIONE DELLA GARANZIA

Poiché questo software viene dato con una licenza gratuita, non c'è alcuna garanzia associata ad esso, ai fini e per quanto permesso dalle leggi applicabili. A meno di quanto possa essere specificato altrove, il proprietario e detentore del copyright fornisce questo software "così com'è" senza garanzia di alcun tipo, sia essa espressa o implicita, includendo fra l'altro (senza però limitarsi a questo) eventuali garanzie implicite di commerciabilità e adeguatezza per uno scopo particolare. L'intero rischio riguardo alla qualità ed alle prestazioni di questo software rimane a voi. Se il software dovesse dimostrarsi difettoso, vi assumete tutte le responsabilità ed i costi per tutti i necessari servizi, riparazioni o correzioni.

In nessun caso, a meno che ciò non sia richiesto dalle leggi vigenti o sia regolato da un accordo scritto, alcuno dei detentori del diritto di copyright, o qualunque altra parte che possa modificare, o redistribuire questo software così come consentito dalla licenza di cui sopra, potrà essere considerato responsabile nei vostri confronti per danni, ivi inclusi danni generali, speciali, incidentali o conseguenziali, derivanti dall'utilizzo o dall'incapacità di utilizzo di questo software. Ciò include, a puro titolo di esempio e senza limitarsi ad essi, la perdita di dati, l'alterazione involontaria o indesiderata di dati, le perdite sostenute da voi o da terze parti o un fallimento del software ad operare con un qualsivoglia altro software. Tale negazione di garanzia rimane in essere anche se i dententori del copyright, o qualsiasi altra parte, è stata avvisata della possibilità di tali danneggiamenti.

Se decidete di utilizzare questo software, lo fate a vostro rischio e pericolo. Se pensate che i termini di questa negazione di garanzia non si confacciano alle vostre esigenze, o al vostro modo di considerare un software, o ancora al modo in cui avete sempre trattato software di terze parti, non usatelo. Se lo usate, accettate espressamente questa negazione di garanzia e la piena responsabilità per qualsiasi tipo di danno, di qualsiasi natura, possa derivarne.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 328:

Non-ASCII character seen before =encoding in 'è'. Assuming CP1252