Commits

Toby Inkster committed a36c231

initial code

  • Participants
  • Tags 0.001

Comments (0)

Files changed (11)

+use inc::Module::Package 'RDF:standard';
+

lib/all/your/base/are/belong/to.pm

+package all::your::base::are::belong::to;
+use 5.006;
+use version;
+BEGIN {
+  $all::your::base::are::belong::to::AUTHORITY = 'cpan:TOBYINK';
+  $all::your::base::are::belong::to::VERSION   = qv('v85.83');
+  require parent and *import = \&parent::import
+}
+__PACKAGE__
+__END__
+
+=head1 NAME
+
+all::your::base::are::belong::to - perform multiple inheritance in Perl!
+
+=head1 SYNOPSIS
+
+ package My::Cat;
+ use all::your::base::are::belong::to 'My::Mammal', 'My::WhiskeredThing';
+
+=head1 DESCRIPTION
+
+OK, that abstract ("perform multiple inheritance in Perl!") makes this module
+sound really clever, but Perl supports multiple inheritance out of the box.
+So really this is just some silly syntactic sugar for setting up a module's
+inheritance chain. The example in the SYNOPSIS section is exactly equivalent
+to:
+
+ package My::Cat;
+ use parent 'My::Mammal', 'My::WhiskeredThing';
+
+which is roughly equivalent to:
+
+ package My::Cat;
+ BEGIN {
+   require My::Mammal;
+	require My::WhiskeredThing;
+	push @My::Cat::ISA, 'My::Mammal', 'My::WhiskeredThing';
+ }
+
+=head1 SEE ALSO
+
+L<parent>, L<perlboot>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+# This file acts as the project's changelog.
+
+@prefix :        <http://usefulinc.com/ns/doap#> .
+@prefix dcs:     <http://ontologi.es/doap-changeset#> .
+@prefix dc:      <http://purl.org/dc/terms/> .
+@prefix dist:    <http://purl.org/NET/cpan-uri/dist/all-your-base-are-belong-to/> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
+
+dist:project :release dist:v_85-83 .
+dist:v_85-83
+	a               :Version ;
+	dc:issued       "2012-01-26"^^xsd:date ;
+	:revision       "v85.83"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/all-your-base-are-belong-to-v85.83.tar.gz> ;
+	rdfs:label      "Initial release" .
+
+# This file contains general metadata about the project.
+
+@prefix :        <http://usefulinc.com/ns/doap#> .
+@prefix dc:      <http://purl.org/dc/terms/> .
+@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
+
+<http://purl.org/NET/cpan-uri/dist/all-your-base-are-belong-to/project>
+	a               :Project ;
+	:programming-language "Perl" ;
+	:name           "all-your-base-are-belong-to" ;
+	:shortdesc      "perform multiple inheritance in Perl!" ;
+	:homepage       <https://metacpan.org/release/all-your-base-are-belong-to> ;
+	:download-page  <https://metacpan.org/release/all-your-base-are-belong-to> ;
+	:bug-database   <http://rt.cpan.org/Dist/Display.html?Queue=all-your-base-are-belong-to> ;
+	:created        "2012-01-26"^^xsd:date ;
+	:license        <http://dev.perl.org/licenses/> ;
+	:developer      [ a foaf:Person ; foaf:name "Toby Inkster" ; foaf:mbox <mailto:tobyink@cpan.org> ] .
+
+<http://dev.perl.org/licenses/>
+	dc:title        "the same terms as the perl 5 programming language system itself" .
+

meta/makefile.ttl

+# This file provides instructions for packaging.
+
+@prefix : <http://purl.org/NET/cpan-uri/terms#> .
+
+<http://purl.org/NET/cpan-uri/dist/all-your-base-are-belong-to/project>
+	:perl_version_from _:main ;
+	:version_from _:main ;
+	:readme_from _:main ;
+	:test_requires "Test::More 0.61", "File::Basename", "File::Spec", "Data::Dumper" ;
+	:requires "parent", "version 0.77".
+
+_:main <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> "lib/all/your/base/are/belong/to.pm" .
+
+use Test::More tests => 1;
+BEGIN { use_ok('all::your::base::are::belong::to') };
+
+package Local::Test::t_02inherit;
+use Test::More tests => 6;
+use all::your::base::are::belong::to
+	qw/
+		File::Spec
+		Data::Dumper
+		/;
+
+isa_ok __PACKAGE__, 'File::Spec';
+isa_ok __PACKAGE__, 'Data::Dumper';
+ok(!__PACKAGE__->isa('File::Basename'), 'The class isn\'ta File:Basename');
+can_ok __PACKAGE__, 'catfile';
+can_ok __PACKAGE__, 'Dumper';
+ok(!__PACKAGE__->can('fileparse_set_fstype'), __PACKAGE__."->cannot('fileparse_set_fstype')");
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
+

xt/02pod_coverage.t

+use Test::More;
+use Test::Pod::Coverage;
+
+my @modules = qw(all::your::base::are::belong::to);
+pod_coverage_ok($_, "$_ is covered")
+	foreach @modules;
+done_testing(scalar @modules);
+

xt/03meta_uptodate.t

+use Test::More tests => 1;
+use Test::RDF::DOAP::Version;
+doap_version_ok('all-your-base-are-belong-to', 'all::your::base::are::belong::to');
+
+use Test::EOL;
+all_perl_files_ok();