Authen::Quiz::FW - Framework for Authen::Quiz.


Authen-Quiz documentation Contained in the Authen-Quiz distribution.

Index


Code Index:

NAME

Top

Authen::Quiz::FW - Framework for Authen::Quiz.

SYNOPSIS

Top

  use Authen::Quiz::FW qw/ JS Memcached /;

  my $q= Authen::Quiz::FW->new(
    data_folder => '/path/to/authen_quiz',
    memcached   => { ...... },
    );

  my $js_source= $q->question2js('boxid');

DESCRIPTION

Top

The framework for Authen::Quiz makes the plugin available.

If use passes the list of the plugin at the time of reading Authen::Quiz::FW, it becomes available.

  use Authen::Quiz::FW qw/ JS Memcached /;

Authen::Quiz::Plugin::JS and Authen::Quiz::Plugin::Memcached was enclosed as a standard plugin.

METHODS

Top

plugins

The list of the read plug-in is returned.

SEE ALSO

Top

Authen::Quiz, UNIVERSAL::require, Class::C3,

http://egg.bomcity.com/wiki?Authen%3a%3aQuiz,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Authen-Quiz documentation Contained in the Authen-Quiz distribution.

package Authen::Quiz::FW;
#
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
#
# $Id: FW.pm 362 2008-08-18 18:34:11Z lushe $
#
use strict;
use warnings;
use Class::C3;
use UNIVERSAL::require;
use Authen::Quiz;

our $VERSION= '0.01';

our @ISA;

my @plugins;
sub plugins { \@plugins }

sub import {
	my $class= shift;
	for (@_) {
		my $pkg= /^\+(.+)/ ? $1: "Authen::Quiz::Plugin::$_";
		push @plugins, $pkg;
		push @ISA, $pkg;
	}
	push @ISA, 'Authen::Quiz';
	push @ISA, 'Authen::Quiz::FW::Base';
	for my $load (@plugins) { $load->require || die __PACKAGE__. " - $@" }
	$class->_setup;
}

package Authen::Quiz::FW::Base;
use strict;
sub _setup { @_ }

1;

__END__