Optimization: it's really slow to go through new_object for every access so
[gitmo/MooseX-Singleton.git] / lib / MooseX / Singleton.pm
CommitLineData
443f4253 1package MooseX::Singleton;
109b110b 2use Moose;
3use MooseX::Singleton::Object;
4use MooseX::Singleton::Meta::Class;
443f4253 5
14676933 6our $VERSION = 0.02;
443f4253 7
109b110b 8sub import {
9 my $caller = caller;
443f4253 10
109b110b 11 Moose::init_meta($caller, 'MooseX::Singleton::Object', 'MooseX::Singleton::Meta::Class');
443f4253 12
109b110b 13 Moose->import({into => $caller});
14 strict->import;
15 warnings->import;
443f4253 16
443f4253 17}
18
191;
20