Parent Directory
|
Revision Log
Root WikiName implemented
| 1 | wakaba | 1.1 | |
| 2 | =head1 NAME | ||
| 3 | |||
| 4 | wakaba | 1.8 | SuikaWiki::Implementation - SuikaWiki: WikiEngine Core |
| 5 | |||
| 6 | =head1 DESCRIPTION | ||
| 7 | |||
| 8 | This module implements core part of the SuikaWiki WikiEngine. | ||
| 9 | All implemented features of WikiEngine can be called directly | ||
| 10 | or indirectly from instance of this module (with some exception | ||
| 11 | such as functions provided by WikiPlugin modules). | ||
| 12 | |||
| 13 | This module is part of SuikaWiki. | ||
| 14 | |||
| 15 | =head1 SYNOPSIS | ||
| 16 | |||
| 17 | require SuikaWiki::Implementation; | ||
| 18 | my $WIKI = new SuikaWiki::Implementation; | ||
| 19 | ... | ||
| 20 | $WIKI->exit; | ||
| 21 | |||
| 22 | C<lib/suikawiki.pl> might be a good example for instanciating WikiEngine. | ||
| 23 | wakaba | 1.1 | |
| 24 | =cut | ||
| 25 | |||
| 26 | package SuikaWiki::Implementation; | ||
| 27 | use strict; | ||
| 28 | wakaba | 1.15 | our $VERSION = do{my @r=(q$Revision: 1.14 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
| 29 | wakaba | 1.1 | |
| 30 | =head1 METHODS | ||
| 31 | |||
| 32 | =over 4 | ||
| 33 | |||
| 34 | =item $wiki = SuikaWiki::Implementation->new () | ||
| 35 | |||
| 36 | Constructs new instance of wiki implementation | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | sub new ($;%) { | ||
| 41 | wakaba | 1.2 | my $self = bless { |
| 42 | wakaba | 1.8 | driver_name => 'WikiImplementation', |
| 43 | driver_version => '0.0', | ||
| 44 | driver_uri_reference => q<about:>, | ||
| 45 | engine_name => 'SuikaWiki', | ||
| 46 | wakaba | 1.15 | engine_version => '2.9.5', |
| 47 | wakaba | 1.8 | engine_uri_reference => q<http://suika.fam.cx/~wakaba/-temp/wiki/wiki?SuikaWiki>, |
| 48 | wakaba | 1.2 | }, shift; |
| 49 | wakaba | 1.1 | |
| 50 | $self; | ||
| 51 | } | ||
| 52 | |||
| 53 | wakaba | 1.2 | =item $wiki->init_variables |
| 54 | |||
| 55 | Initialize per-access variables. This method should be called | ||
| 56 | before other init_* methods are to be called. | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | sub init_variables ($) { | ||
| 61 | my $self = shift; | ||
| 62 | wakaba | 1.7 | $self->close_input; |
| 63 | wakaba | 1.2 | $self->{var} = {}; |
| 64 | wakaba | 1.10 | $self->___raise_event (name => 'setting_initial_variables'); |
| 65 | wakaba | 1.2 | } |
| 66 | |||
| 67 | wakaba | 1.1 | =item $wiki->init_plugin |
| 68 | |||
| 69 | Prepares to use wiki plugins | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | sub init_plugin ($) { | ||
| 74 | my $self = shift; | ||
| 75 | require SuikaWiki::Plugin; | ||
| 76 | wakaba | 1.5 | $self->{plugin} = SuikaWiki::Plugin->new (wiki => $self); |
| 77 | wakaba | 1.1 | |
| 78 | wakaba | 1.10 | $self->___raise_event (name => 'plugin_manager_loaded'); |
| 79 | wakaba | 1.1 | } |
| 80 | |||
| 81 | =item $wiki->init_view | ||
| 82 | |||
| 83 | Prepares to use wikiview | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | sub init_view ($) { | ||
| 88 | my $self = shift; | ||
| 89 | require SuikaWiki::View::Implementation; | ||
| 90 | &n |