r610 - in packages/libclass-default-perl/trunk: . inc/Module inc/Module/Install lib/Class t

Allard Hoeve hoeve-guest@costa.debian.org
Mon, 10 Jan 2005 20:28:39 +0100


Author: hoeve-guest
Date: 2005-01-10 20:28:38 +0100 (Mon, 10 Jan 2005)
New Revision: 610

Added:
   packages/libclass-default-perl/trunk/Build.PL
   packages/libclass-default-perl/trunk/inc/
   packages/libclass-default-perl/trunk/t/00_compile.t
Modified:
   packages/libclass-default-perl/trunk/Changes
   packages/libclass-default-perl/trunk/LICENSE
   packages/libclass-default-perl/trunk/MANIFEST
   packages/libclass-default-perl/trunk/META.yml
   packages/libclass-default-perl/trunk/Makefile.PL
   packages/libclass-default-perl/trunk/README
   packages/libclass-default-perl/trunk/inc/Module/Install.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/AutoInstall.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Build.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm
   packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm
   packages/libclass-default-perl/trunk/lib/Class/Default.pm
   packages/libclass-default-perl/trunk/t/01_main.t
Log:
Merge 1.0 -> 1.1 upgrade into trunk

Copied: packages/libclass-default-perl/trunk/Build.PL (from rev 609, packages/libclass-default-perl/branches/upstream/current/Build.PL)


Property changes on: packages/libclass-default-perl/trunk/Build.PL
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: packages/libclass-default-perl/trunk/Changes
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: packages/libclass-default-perl/trunk/LICENSE
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: packages/libclass-default-perl/trunk/MANIFEST
===================================================================
--- packages/libclass-default-perl/trunk/MANIFEST	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/MANIFEST	2005-01-10 19:28:38 UTC (rev 610)
@@ -1,8 +1,20 @@
+Build.PL
 Changes
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Build.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
 lib/Class/Default.pm
 LICENSE
 Makefile.PL
 MANIFEST			This list of files
+META.yml
 README
+t/00_compile.t
 t/01_main.t
-META.yml                                Module meta-data (added by MakeMaker)


Property changes on: packages/libclass-default-perl/trunk/MANIFEST
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: packages/libclass-default-perl/trunk/META.yml
===================================================================
--- packages/libclass-default-perl/trunk/META.yml	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/META.yml	2005-01-10 19:28:38 UTC (rev 610)
@@ -1,13 +1,15 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Class-Default
-version:      1.0
-version_from: lib/Class/Default.pm
-installdirs:  site
+name: Class-Default
+version: 1.1
+abstract: Static methods apply to a default instantiation
+author: Adam Kennedy<cpan@ali.as>
+license: perl
+distribution_type: module
+build_requires:
+  Test::More: 0.47
+  File::Spec: 0.82
 requires:
-    Class::Inspector:              1
-    File::Spec:                    0.83
-    Test::More:                    0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.16
+  perl: 5.005
+no_index:
+  directory:
+    - inc
+generated_by: Module::Install version 0.35


Property changes on: packages/libclass-default-perl/trunk/META.yml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: packages/libclass-default-perl/trunk/Makefile.PL
===================================================================
--- packages/libclass-default-perl/trunk/Makefile.PL	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/Makefile.PL	2005-01-10 19:28:38 UTC (rev 610)
@@ -1,15 +1,16 @@
-require 5.000;
-use ExtUtils::MakeMaker;
-WriteMakefile(
-	'NAME'         => 'Class::Default',
-	'VERSION_FROM' => 'lib/Class/Default.pm',
-	'PREREQ_PM'    => {
-		'File::Spec'       => 0.83,
-		'Test::More'       => 0,
-		'Class::Inspector' => 1,
-	},
-	($] >= 5.005) ? (
-		'AUTHOR'     => 'Adam Kennedy (cpan@ali.as)',
-		'ABSTRACT'   => "Static methods apply to a default instantiation",
-	) : (),
-);
+use inc::Module::Install;
+
+name          ( 'Class-Default');
+abstract      ( 'Static methods apply to a default instantiation');
+author        ( 'Adam Kennedy<cpan@ali.as>');
+version_from  ( 'lib/Class/Default.pm');
+license       ( 'perl');
+
+requires      ( 'perl'             => '5.005' );
+
+build_requires( 'Test::More'       => '0.47'  );
+build_requires( 'File::Spec'       => '0.82'  );
+
+auto_install();
+
+&WriteAll;


Property changes on: packages/libclass-default-perl/trunk/Makefile.PL
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: packages/libclass-default-perl/trunk/README
===================================================================
--- packages/libclass-default-perl/trunk/README	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/README	2005-01-10 19:28:38 UTC (rev 610)
@@ -161,16 +161,15 @@
     No known bugs, but suggestions are welcome
 
 SUPPORT
+    Bugs should be reported via the CPAN bug tracker at
+
+    <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class%3ADefault>
+
     Contact the author
 
 AUTHOR
-            Adam Kennedy
-            cpan@ali.as
-            http://ali.as/
+    Adam Kennedy (Maintainer), <http://ali.as/>, cpan@ali.as
 
-SEE ALSO
-    Class::*
-
 COPYRIGHT
     Copyright (c) 2002 Adam Kennedy. All rights reserved. This program is
     free software; you can redistribute it and/or modify it under the same


Property changes on: packages/libclass-default-perl/trunk/README
___________________________________________________________________
Name: svn:eol-style
   + native

Copied: packages/libclass-default-perl/trunk/inc (from rev 609, packages/libclass-default-perl/branches/upstream/current/inc)

Modified: packages/libclass-default-perl/trunk/lib/Class/Default.pm
===================================================================
--- packages/libclass-default-perl/trunk/lib/Class/Default.pm	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/lib/Class/Default.pm	2005-01-10 19:28:38 UTC (rev 610)
@@ -5,14 +5,14 @@
 
 # See POD for more details.
 
-require 5.005;
+use 5.005;
 use strict;
-use Carp;
+use Carp ();
 
 # Define globals
 use vars qw{$VERSION %DEFAULT};
 BEGIN { 
-	$VERSION = '1.0';
+	$VERSION = '1.1';
 	
 	# Create the default object storage.
 	%DEFAULT = ();
@@ -24,7 +24,7 @@
 	ref($either) ? $either 
 	: $DEFAULT{$either} 
 		|| ($DEFAULT{$either} = $either->_create_default_object)
-		|| croak "Error while creating default object";
+		|| Carp::croak "Error while creating default object";
 }
 
 # Suplimentary method to reliably get ONLY the class
@@ -36,7 +36,7 @@
 	my $class = shift; 
 	$DEFAULT{$class} 
 		|| ($DEFAULT{$class} = $class->_create_default_object)
-		|| croak "Error while creating default object";
+		|| Carp::croak "Error while creating default object";
 }
 
 # Creates the default object. 
@@ -238,18 +238,16 @@
 
 =head1 SUPPORT
 
+Bugs should be reported via the CPAN bug tracker at
+
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class%3ADefault>
+
 Contact the author
 
 =head1 AUTHOR
 
-        Adam Kennedy
-        cpan@ali.as
-        http://ali.as/
+Adam Kennedy (Maintainer), L<http://ali.as/>, cpan@ali.as
 
-=head1 SEE ALSO
-
-Class::*
-
 =head1 COPYRIGHT
 
 Copyright (c) 2002 Adam Kennedy. All rights reserved.


Property changes on: packages/libclass-default-perl/trunk/lib/Class/Default.pm
___________________________________________________________________
Name: svn:eol-style
   + native

Copied: packages/libclass-default-perl/trunk/t/00_compile.t (from rev 609, packages/libclass-default-perl/branches/upstream/current/t/00_compile.t)


Property changes on: packages/libclass-default-perl/trunk/t/00_compile.t
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: packages/libclass-default-perl/trunk/t/01_main.t
===================================================================
--- packages/libclass-default-perl/trunk/t/01_main.t	2005-01-10 19:26:06 UTC (rev 609)
+++ packages/libclass-default-perl/trunk/t/01_main.t	2005-01-10 19:28:38 UTC (rev 610)
@@ -2,19 +2,24 @@
 
 # Formal testing for Class::Default
 
-# Do all the tests on ourself, since we know we will be loaded.
-
 use strict;
+use lib ();
 use UNIVERSAL 'isa';
-use File::Spec::Functions qw{:ALL};
-use lib catdir( updir(), updir(), 'modules' ), # Development testing
-        catdir( updir(), 'lib' );              # For installation testing
-use Test::More tests => 22;
+use File::Spec::Functions ':ALL';
+BEGIN {
+	$| = 1;
+	unless ( $ENV{HARNESS_ACTIVE} ) {
+		require FindBin;
+		chdir ($FindBin::Bin = $FindBin::Bin); # Avoid a warning
+		lib->import( catdir( updir(), updir(), 'modules') );
+	}
+}
 
+use Test::More tests => 20;
+
 # Set up any needed globals
 use vars qw{$cd $cdt};
 BEGIN {
-	$| = 1;
 	$cd = 'Class::Default';
 	$cdt = 'Class::Default::Test1';
 }
@@ -22,26 +27,52 @@
 
 
 
-# Check their perl version
-BEGIN {
-	ok( $] >= 5.005, "Your perl is new enough" );
-}
 
+# Basic API existance
+ok( Class::Default->can( '_self' ), "Class::Default->_self exists" );
+ok( Class::Default->can( '_get_default' ), "Class::Default->_get_default exists" );
+ok( Class::Default->can( '_create_default_object' ), "Class::Default->_create_default_object exists" );
+ok( Class::Default::Test1->can( '_self' ), "Class::Default::Test1->_self exists" );
+ok( Class::Default::Test1->can( '_get_default' ), "Class::Default::Test1->_get_default exists" );
+ok( Class::Default::Test1->can( '_create_default_object' ),
+	"Class::Default::Test1->_create_default_object exists" );
 
+# Object gets created...
+my $object = Class::Default::Test1->new();
+ok( isa( $object, "Class::Default::Test1" ), "Object isa Class::Default::Test1" );
+ok( isa( $object, "Class::Default" ), "Object isa Class::Default" );
+ok( ! scalar keys %Class::Default::DEFAULT, "DEFAULT hash remains empty after normal object creation" );
 
+# Default gets created
+my $default1 = Class::Default::Test1->_get_default;
+ok( $default1, "->_get_default returns something" );
+ok( (ref $default1 eq $cdt), "->_get_default returns the correct object type" );
+ok( scalar keys %Class::Default::DEFAULT, "DEFAULT hash contains something after _get_default" );
+ok( (scalar keys %Class::Default::DEFAULT == 1), "DEFAULT hash contains only one thing after _get_default" );
+ok( exists $Class::Default::DEFAULT{$cdt}, "DEFAULT hash contains the correct key after _get_Default" );
+ok( "$Class::Default::DEFAULT{$cdt}" eq "$default1",
+	"DEFAULT hash entry matches that returned" );
 
+# Get another object and see if they match
+my $default2 = Class::Default::Test1->_get_default;
+ok( "$default1" eq "$default2", "Second object matches the first object" );
 
-# Does the module load
-use_ok( 'Class::Default' );
+# Check the response of a typical method as compared to the static
+ok( $object->hash eq "$object", "Result of basic object method matchs" );
+ok( Class::Default::Test1->hash eq "$default1", "Result of basic static method matchs" );
 
+# Check the result of the _class method
+ok( Class::Default::Test1->class eq 'Class::Default::Test1', "Static ->_class returns the class" );
+ok( $default1->class eq 'Class::Default::Test1', "Object ->_class returns the class" );
 
 
 
-# Create the test package
-package Class::Default::Test1;
 
-use strict;
 
+
+# Define the testing package
+package Class::Default::Test1;
+
 use base 'Class::Default';
 
 sub new {
@@ -74,46 +105,3 @@
 }
 
 1;
-
-package main;
-
-
-
-
-
-# Basic API existance
-ok( Class::Default->can( '_self' ), "Class::Default->_self exists" );
-ok( Class::Default->can( '_get_default' ), "Class::Default->_get_default exists" );
-ok( Class::Default->can( '_create_default_object' ), "Class::Default->_create_default_object exists" );
-ok( Class::Default::Test1->can( '_self' ), "Class::Default::Test1->_self exists" );
-ok( Class::Default::Test1->can( '_get_default' ), "Class::Default::Test1->_get_default exists" );
-ok( Class::Default::Test1->can( '_create_default_object' ),
-	"Class::Default::Test1->_create_default_object exists" );
-
-# Object gets created...
-my $object = Class::Default::Test1->new();
-ok( isa( $object, "Class::Default::Test1" ), "Object isa Class::Default::Test1" );
-ok( isa( $object, "Class::Default" ), "Object isa Class::Default" );
-ok( ! scalar keys %Class::Default::DEFAULT, "DEFAULT hash remains empty after normal object creation" );
-
-# Default gets created
-my $default1 = Class::Default::Test1->_get_default;
-ok( $default1, "->_get_default returns something" );
-ok( (ref $default1 eq $cdt), "->_get_default returns the correct object type" );
-ok( scalar keys %Class::Default::DEFAULT, "DEFAULT hash contains something after _get_default" );
-ok( (scalar keys %Class::Default::DEFAULT == 1), "DEFAULT hash contains only one thing after _get_default" );
-ok( exists $Class::Default::DEFAULT{$cdt}, "DEFAULT hash contains the correct key after _get_Default" );
-ok( "$Class::Default::DEFAULT{$cdt}" eq "$default1",
-	"DEFAULT hash entry matches that returned" );
-
-# Get another object and see if they match
-my $default2 = Class::Default::Test1->_get_default;
-ok( "$default1" eq "$default2", "Second object matches the first object" );
-
-# Check the response of a typical method as compared to the static
-ok( $object->hash eq "$object", "Result of basic object method matchs" );
-ok( Class::Default::Test1->hash eq "$default1", "Result of basic static method matchs" );
-
-# Check the result of the _class method
-ok( Class::Default::Test1->class eq 'Class::Default::Test1', "Static ->_class returns the class" );
-ok( $default1->class eq 'Class::Default::Test1', "Object ->_class returns the class" );


Property changes on: packages/libclass-default-perl/trunk/t/01_main.t
___________________________________________________________________
Name: svn:eol-style
   + native