+++ /dev/null
-use strict;
-use warnings;
-use inc::Module::Install;
-
-name 'MooseX-Singleton';
-all_from 'lib/MooseX/Singleton.pm';
-
-requires 'Moose' => '1.10';
-requires 'Scalar::Util';
-
-test_requires 'Test::More' => '0.88';
-test_requires 'Test::Fatal';
-test_requires 'Test::Requires';
-
-license 'Perl';
-
-extra_tests();
-
-WriteAll();
--- /dev/null
+name = MooseX-Singleton
+author = Shawn M Moore <sartak@gmail.com>
+license = Perl_5
+copyright_holder = Shawn M Moore
+copyright_year = 2001
+
+version = 0.25
+
+[GatherDir]
+[PruneCruft]
+[ManifestSkip]
+[MetaYAML]
+[MetaJSON]
+[License]
+[Readme]
+[ExtraTests]
+[ExecDir]
+[ShareDir]
+
+[MakeMaker]
+[Manifest]
+
+[TestRelease]
+[ConfirmRelease]
+[UploadToCPAN]
+
+[NextRelease]
+format = %v %{ccc, MMM dd, yyyy}d
+
+[PkgVersion]
+
+[Authority]
+authority = cpan:SARTAK
+
+[MetaResources]
+bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Singleton
+bugtracker.mailto = bug-moosex-singleton@rt.cpan.org
+repository.url = git://git.moose.perl.org/MooseX-Singleton.git
+repository.web = http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-Singleton.git;a=summary
+repository.type = git
+
+[SurgicalPodWeaver]
+
+[PodSyntaxTests]
+[EOLTests]
+[NoTabsTests]
+
+[CheckChangeLog]
+
+[Prereqs / BuildRequires]
+ExtUtils::MakeMaker = 6.42
+Test::Fatal = 0
+Test::More = 0.88
+Test::Requires = 0
+
+[Prereqs]
+Moose = 1.10
+Scalar::Util = 0
+
+[Git::Check]
+allow_dirty =
+
+[Git::Tag]
+tag_format = %v
+tag_message =
use MooseX::Singleton::Role::Meta::Class;
use MooseX::Singleton::Role::Meta::Instance;
-our $VERSION = '0.25';
-$VERSION = eval $VERSION;
Moose::Exporter->setup_import_methods( also => 'Moose' );
1;
+# ABSTRACT: turn your Moose class into a singleton
+
__END__
=pod
-=head1 NAME
-
-MooseX::Singleton - turn your Moose class into a singleton
-
=head1 SYNOPSIS
package MyApp;
L<http://rt.cpan.org>. We will be notified, and then you'll automatically be
notified of progress on your bug as we make changes.
-=head1 AUTHORS
-
-Shawn M Moore E<lt>sartak@gmail.comE<gt>
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
=head1 SOME CODE STOLEN FROM
Anders Nor Berle E<lt>debolaz@gmail.comE<gt>
Ricardo SIGNES E<lt>rjbs@cpan.orgE<gt>
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2007-2009 Infinity Interactive
-
-This program is free software; you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
=cut
use MooseX::Singleton::Role::Meta::Instance;
use MooseX::Singleton::Role::Meta::Method::Constructor;
-our $VERSION = '0.25';
-$VERSION = eval $VERSION;
sub existing_singleton {
my ($class) = @_;
1;
+# ABSTRACT: Metaclass role for MooseX::Singleton
+
__END__
=pod
-=head1 NAME
-
-MooseX::Singleton::Role::Meta::Class - Metaclass role for MooseX::Singleton
-
=head1 DESCRIPTION
This metaclass role makes sure that there is only ever one instance of an
use Moose::Role;
use Scalar::Util 'weaken';
-our $VERSION = '0.25';
-$VERSION = eval $VERSION;
sub get_singleton_instance {
my ( $self, $instance ) = @_;
1;
+# ABSTRACT: Instance metaclass role for MooseX::Singleton
+
__END__
=pod
-=head1 NAME
-
-MooseX::Singleton::Role::Meta::Instance - Instance metaclass role for MooseX::Singleton
-
=head1 DESCRIPTION
This role overrides all object access so that it gets the appropriate
package MooseX::Singleton::Role::Meta::Method::Constructor;
use Moose::Role;
-our $VERSION = '0.25';
-$VERSION = eval $VERSION;
if ( $Moose::VERSION < 1.9900 ) {
override _initialize_body => sub {
1;
+# ABSTRACT: Constructor method role for MooseX::Singleton
+
__END__
=pod
-=head1 NAME
-
-MooseX::Singleton::Role::Meta::Method::Constructor - Constructor method role for MooseX::Singleton
-
=head1 DESCRIPTION
This role overrides the generated object C<new> method so that it returns the
use Moose::Role;
use Carp qw( carp );
-our $VERSION = '0.25';
-$VERSION = eval $VERSION;
sub instance { shift->new }
1;
+# ABSTRACT: Object class role for MooseX::Singleton
+
__END__
=pod
-=head1 NAME
-
-MooseX::Singleton::Role::Object - Object class role for MooseX::Singleton
-
=head1 DESCRIPTION
This just adds C<instance> as a shortcut for C<new>.
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-use Test::Requires {
- 'Test::Pod' => '1.14', # skip all if not installed
-};
-
-all_pod_files_ok();
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-use Test::Requires {
- 'Test::NoTabs' => '0.8', # skip all if not installed
-};
-
-# Module::Install has tabs, so we can't check 'inc' or ideally '.'
-all_perl_files_ok('lib', 't', 'xt');
-
+++ /dev/null
-use strict;
-use warnings;
-
-use Test::More;
-
-use Test::Requires {
- 'File::Find::Rule' => '0.01', # skip all if not installed
- 'Module::Info' => '0.01',
-};
-
-my %versions;
-for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in('lib' ) ) {
- my $mod = Module::Info->new_from_file($pm_file);
-
- ( my $stripped_file = $pm_file ) =~ s{^lib/}{};
-
- $versions{$stripped_file} = $mod->version;
-}
-
-my $moose_ver = $versions{'MooseX/Singleton.pm'};
-
-for my $module ( grep { $_ ne 'MooseX/Singleton.pm' } sort keys %versions ) {
- is( $versions{$module}, $moose_ver,
- "version for $module is the same as in MooseX/Singleton.pm" );
-}
-
-done_testing;