The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ScopeSession::Singleton - Singleton class for ScopeSession

VERSION

Version 0.01

SYNOPSIS

ScopeSession::Singleton works the same as Class::Singleton or Apache::Singleton, but with scope base lifetime.

    package Something::UniqueInSession;
    use base 'ScopeSession::Singleton';

    ScopeSession::start {
        my $foo = Something::UniqueInSession->instance;
    };

METHODS

instance

get the scope unique instance of subclass.

SEE ALSO

Class::Singleton ,Apache::Singleton

AUTHOR

Daichi Hiroki, <hirokidaichi<AT>gmail.com>

LICENSE AND COPYRIGHT

Copyright 2009 Daichi Hiroki.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.