r60654 - in /branches/upstream/libstring-camelcase-perl: ./ current/ current/inc/ current/inc/ExtUtils/ current/lib/ current/lib/String/ current/t/
antgel-guest at users.alioth.debian.org
antgel-guest at users.alioth.debian.org
Tue Jul 27 15:39:42 UTC 2010
Author: antgel-guest
Date: Tue Jul 27 15:39:15 2010
New Revision: 60654
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=60654
Log:
[svn-inject] Installing original source of libstring-camelcase-perl (0.02)
Added:
branches/upstream/libstring-camelcase-perl/
branches/upstream/libstring-camelcase-perl/current/
branches/upstream/libstring-camelcase-perl/current/Changes
branches/upstream/libstring-camelcase-perl/current/MANIFEST
branches/upstream/libstring-camelcase-perl/current/META.yml
branches/upstream/libstring-camelcase-perl/current/Makefile.PL
branches/upstream/libstring-camelcase-perl/current/README
branches/upstream/libstring-camelcase-perl/current/SIGNATURE
branches/upstream/libstring-camelcase-perl/current/inc/
branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/
branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/MY_Metafile.pm
branches/upstream/libstring-camelcase-perl/current/lib/
branches/upstream/libstring-camelcase-perl/current/lib/String/
branches/upstream/libstring-camelcase-perl/current/lib/String/CamelCase.pm
branches/upstream/libstring-camelcase-perl/current/t/
branches/upstream/libstring-camelcase-perl/current/t/00-load.t
branches/upstream/libstring-camelcase-perl/current/t/01-basic.t
branches/upstream/libstring-camelcase-perl/current/t/02-more.t
branches/upstream/libstring-camelcase-perl/current/t/boilerplate.t
branches/upstream/libstring-camelcase-perl/current/t/pod-coverage.t
branches/upstream/libstring-camelcase-perl/current/t/pod.t
Added: branches/upstream/libstring-camelcase-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/Changes?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/Changes (added)
+++ branches/upstream/libstring-camelcase-perl/current/Changes Tue Jul 27 15:39:15 2010
@@ -1,0 +1,9 @@
+Revision history for String-CamelCase
+
+0.02 Mon Dec 28 08:28:44 JST 2009
+ fix pod syntax (no code changes).
+ Thanks to Pedro Melo and Tokuhiro Matsuno.
+
+0.01 Wed Sep 6 09:30:19 JST 2006
+ First version.
+
Added: branches/upstream/libstring-camelcase-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/MANIFEST?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/MANIFEST (added)
+++ branches/upstream/libstring-camelcase-perl/current/MANIFEST Tue Jul 27 15:39:15 2010
@@ -1,0 +1,14 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+SIGNATURE
+inc/ExtUtils/MY_Metafile.pm
+lib/String/CamelCase.pm
+t/00-load.t
+t/01-basic.t
+t/02-more.t
+t/boilerplate.t
+t/pod-coverage.t
+t/pod.t
+META.yml Module meta-data (added by MakeMaker)
Added: branches/upstream/libstring-camelcase-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/META.yml?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/META.yml (added)
+++ branches/upstream/libstring-camelcase-perl/current/META.yml Tue Jul 27 15:39:15 2010
@@ -1,0 +1,21 @@
+# http://module-build.sourceforge.net/META-spec.html
+name: String-CamelCase
+version: 0.02
+version_from: lib/String/CamelCase.pm
+installdirs: site
+author: YAMASHINA Hio <hio at cpan.org>
+abstract: camelcase, de-camelcase
+license: perl
+requires:
+ Test::More: 0
+#build_requires:
+no_index:
+ directory:
+ - inc
+ - t
+
+distribution_type: module
+generated_by: ExtUtils::MY_Metafile version 0.09, EUMM-6.17.
+meta-spec:
+ version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
Added: branches/upstream/libstring-camelcase-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/Makefile.PL?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/Makefile.PL (added)
+++ branches/upstream/libstring-camelcase-perl/current/Makefile.PL Tue Jul 27 15:39:15 2010
@@ -1,0 +1,24 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+use inc::ExtUtils::MY_Metafile qw(my_metafile);
+
+my_metafile {
+ no_index => {
+ directory => [ qw(inc t), ],
+ },
+ license => 'perl',
+};
+
+WriteMakefile(
+ NAME => 'String::CamelCase',
+ AUTHOR => 'YAMASHINA Hio <hio at cpan.org>',
+ VERSION_FROM => 'lib/String/CamelCase.pm',
+ ABSTRACT_FROM => 'lib/String/CamelCase.pm',
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'String-CamelCase-*' },
+);
Added: branches/upstream/libstring-camelcase-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/README?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/README (added)
+++ branches/upstream/libstring-camelcase-perl/current/README Tue Jul 27 15:39:15 2010
@@ -1,0 +1,38 @@
+String-CamelCase
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+
+SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the perldoc command.
+
+ perldoc String::CamelCase
+
+You can also look for information at:
+
+ Search CPAN
+ http://search.cpan.org/dist/String-CamelCase
+
+ CPAN Request Tracker:
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=String-CamelCase
+
+ AnnoCPAN, annotated CPAN documentation:
+ http://annocpan.org/dist/String-CamelCase
+
+ CPAN Ratings:
+ http://cpanratings.perl.org/d/String-CamelCase
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 YAMASHINA Hio
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
Added: branches/upstream/libstring-camelcase-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/SIGNATURE?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/SIGNATURE (added)
+++ branches/upstream/libstring-camelcase-perl/current/SIGNATURE Tue Jul 27 15:39:15 2010
@@ -1,0 +1,36 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.55.
+
+To verify the content in this distribution, first make sure you have
+Module::Signature installed, then type:
+
+ % cpansign -v
+
+It will check each file's integrity, as well as the signature's
+validity. If "==> Signature verified OK! <==" is not displayed,
+the distribution may already have been compromised, and you should
+not run its Makefile.PL or Build.PL.
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+SHA1 d779df0dbbfea1744975ede76a0639b6999e638b Changes
+SHA1 29ce977d168c8284df2b66f377cea8b369e317e8 MANIFEST
+SHA1 59671270af4b03bb448113c1d47cf11f5f114adb META.yml
+SHA1 cddfa65461d0571b8403103290f8aba584bc05b7 Makefile.PL
+SHA1 ae23f3ad169930ff89b9a6cc3d24986ce004d49d README
+SHA1 80e8631165eda1b36369ff589883c57fc6baee73 inc/ExtUtils/MY_Metafile.pm
+SHA1 c941267e6f144c4fde9fbcb218b49d7944ab9703 lib/String/CamelCase.pm
+SHA1 c088dfba4b96c047b451a8fceff29e804b2b51d8 t/00-load.t
+SHA1 886be3c6977dcdbcf06261b2cda2cdc026bb5ab8 t/01-basic.t
+SHA1 de966e57fbdb45b6bdfcdeef306a2d54a17dea92 t/02-more.t
+SHA1 d5360204f683074c93498d18a6506a4f57864c8e t/boilerplate.t
+SHA1 6da39b48ce64b584e4c3274bff96fc76ff484820 t/pod-coverage.t
+SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFLN+/oewjCT38k4dkRAsmCAJ45n+96An5VqLRp3SKkcEuaWnWzbQCfcXFr
+pWnKlk0mw+iLbzb8D0UG2BI=
+=06Od
+-----END PGP SIGNATURE-----
Added: branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/MY_Metafile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/MY_Metafile.pm?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/MY_Metafile.pm (added)
+++ branches/upstream/libstring-camelcase-perl/current/inc/ExtUtils/MY_Metafile.pm Tue Jul 27 15:39:15 2010
@@ -1,0 +1,550 @@
+## ----------------------------------------------------------------------------
+# ExtUtils::MY_Metafile
+# -----------------------------------------------------------------------------
+# Mastering programmed by YAMASHINA Hio
+#
+# Copyright 2006-2008 YAMASHINA Hio
+# -----------------------------------------------------------------------------
+# $Id: MY_Metafile.pm 5362 2008-01-30 05:09:42Z hio $
+# -----------------------------------------------------------------------------
+package ExtUtils::MY_Metafile;
+use strict;
+#use warnings; # warnings pragma was first released with perl 5.006.
+use ExtUtils::MakeMaker;
+
+use vars qw($VERSION @EXPORT);
+
+$VERSION = '0.09';
+ at EXPORT = qw(my_metafile);
+
+use vars qw(%META_PARAMS); # DISTNAME(pkgname)=>HASHREF.
+
+use vars qw($DEFAULT_META_SPEC_VERSION);
+$DEFAULT_META_SPEC_VERSION = '1.3';
+
+1;
+
+# -----------------------------------------------------------------------------
+# for: use inc::ExtUtils::MY_Metafile;
+#
+sub inc::ExtUtils::MY_Metafile::import
+{
+ my $pkg = 'ExtUtils::MY_Metafile';
+ push(@inc::ExtUtils::MY_Metafile::ISA, $pkg);
+ goto &import;
+}
+
+# -----------------------------------------------------------------------------
+# import.
+#
+sub import
+{
+ my $pkg = shift;
+ my @syms = (!@_ || grep{/^:all$/}@_) ? @EXPORT : @_;
+ my $callerpkg = caller;
+
+ foreach my $name (@syms)
+ {
+ my $sub = $pkg->can($name);
+ $sub or next;
+ no strict 'refs';
+ *{$callerpkg.'::'.$name} = $sub;
+ }
+ if( !grep{ /^:no_setup$/ } @_ )
+ {
+ # override.
+ *MM::metafile_target = \&_mm_metafile;
+ }
+}
+
+# -----------------------------------------------------------------------------
+# _diag_version();
+#
+sub _diag_version
+{
+ my $mmver = $ExtUtils::MakeMaker::VERSION;
+ my $mmvernum = $mmver;
+ if( $mmvernum =~ /^(\d+)\.(\d+)_(\d+)\z/ )
+ {
+ $mmvernum = "$1.$2$3";
+ $mmver .= "=$mmvernum";
+ }
+ if( $mmvernum >= 6.30 )
+ {
+ print STDERR "# ExtUtils::MY_Metafile for MM 6.30 or later ($mmver).\n";
+ }else
+ {
+ print STDERR "# ExtUtils::MY_Metafile for MM 6.25 or earlier ($mmver).\n";
+ }
+}
+
+# -----------------------------------------------------------------------------
+# my_metafile($distname => $param);
+# my_metafile($param);
+#
+sub my_metafile
+{
+ my $distname = @_>=2 && shift;
+ my $param = shift;
+ UNIVERSAL::isa($distname,'HASH') and $distname = $distname->{DISTNAME};
+ $distname ||= '';
+ $distname =~ s/::/-/g;
+ $META_PARAMS{$distname} and warn "# overwrite previous meta config $distname.\n";
+ $META_PARAMS{$distname} = $param;
+}
+
+# -----------------------------------------------------------------------------
+# _mm_metafile($MM)
+# altanative of MM::metafile_target.
+# takes $MM object and returns makefile text.
+#
+sub _mm_metafile
+{
+ my $this = shift;
+
+ if( $this->{NO_META} )
+ {
+ return
+ "metafile:\n" .
+ "\t\$(NOECHO) \$(NOOP)\n";
+ }
+
+ # generate META.yml text.
+ #
+ my $meta = _gen_meta_yml($this);
+ my @write_meta = (
+ '$(NOECHO) $(ECHO) Generating META.yml',
+ $this->echo($meta, 'META_new.yml'),
+ );
+
+ # format as makefile text.
+ #
+ my ($make_target, $metaout_file);
+ my $mmvernum = $ExtUtils::MakeMaker::VERSION;
+ if( $mmvernum =~ /^(\d+)\.(\d+)_(\d+)\z/ )
+ {
+ $mmvernum = "$1.$2$3";
+ }
+ if( $mmvernum >= 6.30 )
+ {
+ $make_target = "# for MM 6.30 or later.\n";
+ $make_target .= "metafile : create_distdir\n";
+ $metaout_file = '$(DISTVNAME)/META.yml';
+ }else
+ {
+ $make_target = "# for MM 6.25 or earlier.\n";
+ $make_target .= "metafile :\n";
+ $metaout_file = 'META.yml',
+ }
+
+ my $rename_meta = "-\$(NOECHO) \$(MV) META_new.yml $metaout_file";
+ my $make_body = join('', map{"\t$_\n"} @write_meta, $rename_meta);
+ "$make_target$make_body";
+}
+
+# -----------------------------------------------------------------------------
+# _gen_meta_yml($MM);
+# generate META.yml text.
+#
+sub _gen_meta_yml
+{
+ # from MakeMaker-6.30.
+ my $this = shift;
+ my $param = shift;
+ my $check_meta_spec = 1;
+ if( !$param )
+ {
+ $param = $META_PARAMS{$this->{DISTNAME}} || $META_PARAMS{''};
+ if( !$param )
+ {
+ $param = {};
+ $check_meta_spec = 0;
+ }
+ }
+ if( $META_PARAMS{':all'} )
+ {
+ # special key.
+ $param = { %{$META_PARAMS{':all'}}, %$param };
+ }
+
+ # meta_spec and meta_spec_version.
+ my $meta_spec = $param->{meta_spec} || $param->{'meta-spec'};
+ if($param->{meta_spec} && $param->{'meta-spec'} )
+ {
+ warn "both meta_spec and meta-spec exist.\n";
+ }
+ $meta_spec &&= {%$meta_spec}; # sharrow-copy.
+ $meta_spec ||= {};
+ if( exists($param->{meta_spec_version}) && exists($meta_spec->{version}) )
+ {
+ warn "both meta_spec_vesrion and meta_spec.version exist.\n";
+ }
+ $meta_spec->{version} ||= $param->{meta_spec_version} || $DEFAULT_META_SPEC_VERSION;
+ $meta_spec->{url} ||= "http://module-build.sourceforge.net/META-spec-v$meta_spec->{version}.html";
+
+ # requires:, build_requires:
+ my $requires_to_yaml = sub{
+ my $key = shift;
+ my $hash = shift;
+ my $yaml = '';
+ my ($maxkeylen) = sort{$b<=>$a} map{length($_)} keys %$hash;
+ my ($maxvallen) = sort{$b<=>$a} map{length($_)} values %$hash;
+ foreach my $name ( sort { lc $a cmp lc $b } keys %$hash )
+ {
+ my $ver = $hash->{$name};
+ $yaml .= sprintf " %-*s %*s\n", $maxkeylen+1, "$name:", $maxvallen, $ver;
+ }
+ chomp $yaml;
+ $yaml ? "$key:\n$yaml" : '';
+ };
+ my $requires = $requires_to_yaml->(requires => $param->{requires} || $this->{PREREQ_PM});
+ my $build_requires = $requires_to_yaml->(build_requires => $param->{build_requires});
+
+ # no_index:
+ my $no_index = $param->{no_index};
+ if( !$no_index || !$no_index->{directory} )
+ {
+ my @dirs = grep{-d $_} (qw(
+ inc t
+ ex eg example examples sample samples demo demos
+ ));
+ $no_index = @dirs && +{ directory => \@dirs };
+ }
+ $no_index = $no_index ? _yaml_out({no_index=>$no_index}) : '';
+ chomp $no_index;
+ if( $param->{no_index} && !$ENV{NO_NO_INDEX_CHECK} )
+ {
+ my $warned;
+ foreach my $key (keys %{$param->{no_index}})
+ {
+ # dir is in spec-v1.2, directory is from spec-v1.3.
+ if( $key eq 'dir' && $meta_spec->{version}>=1.3 )
+ {
+ $warned ||= print STDERR "\n";
+ warn "$key should be `directory' in META-spec-v1.3 and later.\n";
+ next;
+ }
+ $key =~ /^(file|dir|directory|package|namespace)$/ and next;
+ $warned ||= print STDERR "\n";
+ warn "$key is invalid field for no_index.\n";
+ }
+ $warned and print STDERR "\n";
+ }
+
+ # abstract is from file.
+ my $abstract = '';
+ if( $this->{ABSTRACT} )
+ {
+ $abstract = _yaml_out({abstract => $this->{ABSTRACT}});
+ }elsif( $this->{ABSTRACT_FROM} && open(my$fh, "< $this->{ABSTRACT_FROM}") )
+ {
+ while(<$fh>)
+ {
+ /^=head1 NAME$/ or next;
+ (my $pkg = $this->{DISTNAME}) =~ s/-/::/g;
+ while(<$fh>)
+ {
+ /^=/ and last;
+ /^(\Q$pkg\E\s+-+\s+)(.*)/ or next;
+ $abstract = $2;
+ last;
+ }
+ last;
+ }
+ $abstract = $abstract ? _yaml_out({abstract=>$abstract}) : '';
+ }
+ chomp $abstract;
+
+ # build yaml object as hash.
+ my $yaml = {}; # key=>"value as yaml-text".
+
+ # first, set from arguments for WriteMakefile().
+ $yaml->{name} = $this->{DISTNAME};
+ $yaml->{version} = $this->{VERSION};
+ $yaml->{version_from} = $this->{VERSION_FROM};
+ $yaml->{installdirs} = $this->{INSTALLDIRS};
+ $yaml->{author} = $this->{AUTHOR};
+ $yaml->{license} = $this->{LICENSE};
+ foreach my $key (keys %$yaml)
+ {
+ if( $yaml->{$key} )
+ {
+ my $pad = ' 'x(12-length($key));
+ $yaml->{$key} = sprintf('%s:%s %s', $key, $pad, $yaml->{$key});
+ }
+ }
+ $yaml->{abstract} = $abstract;
+ $yaml->{no_index} = $no_index;
+ $yaml->{requires} = $requires;
+ $yaml->{build_requires} = $build_requires;
+
+ $yaml->{distribution_type} = 'distribution_type: module';
+ $yaml->{generated_by} = "generated_by: ExtUtils::MY_Metafile version $VERSION, EUMM-$ExtUtils::MakeMaker::VERSION.";
+
+ $yaml->{'meta-spec'} = "meta-spec:\n";
+ $yaml->{'meta-spec'} .= " version: ".delete($meta_spec->{version})."\n";
+ $yaml->{'meta-spec'} .= " url: ".delete($meta_spec->{url})."\n";
+
+ # next, set from arguments for my_metafile().
+ my $extras = {};
+ foreach my $key (sort keys %$param)
+ {
+ grep{$key eq $_} qw(no_index requires build_requires meta_spec meta-spec meta_spec_version) and next;
+ my $line = _yaml_out->({$key=>$param->{$key}});
+ if( exists($yaml->{$key}) )
+ {
+ chomp $line;
+ $yaml->{$key} = $line;
+ }else
+ {
+ $extras->{$key} = $line;
+ }
+ }
+ $yaml->{extras} = join('', map{$extras->{$_}} sort keys %$extras);
+
+ # then, check required keys by yaml-spec.
+ my @required_keys = qw(meta-spec name version abstract author license generated_by);
+ foreach my $key (@required_keys)
+ {
+ $check_meta_spec or next;
+ my $ok = $yaml->{$key} && $yaml->{$key}=~/\w/;
+ $ok ||= $extras->{$key} and next;
+ warn "$key is required for meta-spec v1.2 ($this->{DISTNAME}).\n";
+ }
+
+ if( exists($param->{license}) && exists($this->{LICENSE}) && $param->{license} ne $this->{LICENSE} )
+ {
+ warn "WriteMakefile.LICENSE ($this->{LICENSE}) is different from my_metafile.license ($param->{license}).";
+ }
+
+ $yaml->{license} ||= 'license: unknown';
+ foreach my $key (keys %$yaml)
+ {
+ $key eq 'extras' and next;
+ $yaml->{$key} ||= "#$key:";
+ }
+ $yaml->{extras} &&= "\n# extras.\n$yaml->{extras}";
+
+ foreach my $key (qw(abstract license))
+ {
+ my $pad = ' 'x(12-length($key));
+ $yaml->{$key} =~ s/^$key: +(.+)\z/$key:$pad $1/;
+ }
+
+ # packing into singple text.
+ my $meta = <<YAML;
+# http://module-build.sourceforge.net/META-spec.html
+$yaml->{name}
+$yaml->{version}
+$yaml->{version_from}
+$yaml->{installdirs}
+$yaml->{author}
+$yaml->{abstract}
+$yaml->{license}
+$yaml->{requires}
+$yaml->{build_requires}
+$yaml->{no_index}
+$yaml->{extras}
+$yaml->{distribution_type}
+$yaml->{generated_by}
+$yaml->{'meta-spec'}
+YAML
+ #print "$meta";
+ $meta;
+}
+
+# -----------------------------------------------------------------------------
+# generate simple yaml.
+#
+sub _yaml_out
+{
+ my $obj = shift;
+
+ my $depth = shift || 0;
+ my $out = '';
+
+ if( !defined($obj) )
+ {
+ $out = " "x$depth."~\n";
+ }elsif( !ref($obj) )
+ {
+ $out = " "x$depth.$obj."\n";
+ }elsif( ref($obj)eq'ARRAY' )
+ {
+ my @e = map{_yaml_out->($_, $depth+1)} @$obj;
+ @e = map{ " "x$depth."- ".substr($_, ($depth+1)*2)} @e;
+ $out = join('', @e);
+ $out ||= " "x$depth."[]";
+ }elsif( ref($obj)eq'HASH' )
+ {
+ foreach my $k (sort keys %$obj)
+ {
+ $out .= " "x$depth."$k:";
+ $out .= ref($obj->{$k}) ? "\n"._yaml_out($obj->{$k}, $depth+1) : " $obj->{$k}\n";
+ }
+ $out ||= " "x$depth."{}";
+ }else
+ {
+ die "not supported: $obj";
+ }
+ $out;
+}
+
+# -----------------------------------------------------------------------------
+# End of Code.
+# -----------------------------------------------------------------------------
+
+__END__
+
+=encoding utf8
+
+=for stopwords
+ YAMASHINA
+ Hio
+ ACKNOWLEDGEMENTS
+ AnnoCPAN
+ CPAN
+ EUMM
+ META.yml
+ RT
+
+=head1 NAME
+
+ExtUtils::MY_Metafile - META.yml customize with ExtUtil::MakeMaker
+
+
+=head1 VERSION
+
+Version 0.09
+
+
+=head1 SYNOPSIS
+
+put ExtUtils/MY_Metafile.pm into inc/ExtUtils/MY_Metafile.pm:
+
+
+ $ mkdir -p inc/ExtUtils
+ $ cp `perldoc -l ExtUtils::MY_Metafile` inc/ExtUtils/
+
+and write in your Makefile.PL:
+
+
+ use ExtUtils::MakeMaker;
+ use inc::ExtUtils::MY_Metafile;
+
+ my_metafile {
+ no_index => {
+ directory => [ qw(inc example t), ],
+ },
+ license => 'perl',
+ };
+
+ WriteMakefile(
+ DISTNAME => 'Your::Module',
+ ...
+ );
+
+=head1 EXPORT
+
+This module exports one function.
+
+
+=head1 FUNCTIONS
+
+=head2 my_metafile $modname => \%meta_param;
+
+Takes two arguments.
+First one is package name to be generated, and you can omit this
+argument. Second is hashref which contains META.yml contents.
+
+
+ my_metafile {
+ no_index => {
+ directory => [ qw(inc example t), ],
+ },
+ license => 'perl',
+ };
+
+Some parameters are checked automatically.
+
+
+=over
+
+=item no_index
+
+If you not specify C<directory> parameter for C<no_index> and
+there are any directory of F<inc t ex eg example examples
+sample samples demo demos>, they are set as it.
+
+
+=item requires
+
+C<requires> directive is set from C<PREREQ_PM> parameter
+of EUMM. If you want to use C<build_requires>, you can write it.
+
+
+=back
+
+=head1 AUTHOR
+
+YAMASHINA Hio, C<< <hio at cpan.org> >>
+
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-extutils-my_metafile at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ExtUtils-MY_Metafile>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+
+ perldoc ExtUtils::MY_Metafile
+
+You can also look for information at:
+
+
+=over 4
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/ExtUtils-MY_Metafile>
+
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/ExtUtils-MY_Metafile>
+
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MY_Metafile>
+
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/ExtUtils-MY_Metafile>
+
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2006-2008 YAMASHINA Hio, all rights reserved.
+
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+# -----------------------------------------------------------------------------
+# End of File.
+# -----------------------------------------------------------------------------
Added: branches/upstream/libstring-camelcase-perl/current/lib/String/CamelCase.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/lib/String/CamelCase.pm?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/lib/String/CamelCase.pm (added)
+++ branches/upstream/libstring-camelcase-perl/current/lib/String/CamelCase.pm Tue Jul 27 15:39:15 2010
@@ -1,0 +1,138 @@
+## ----------------------------------------------------------------------------
+# String::CamelCase
+# -----------------------------------------------------------------------------
+# Mastering programmed by YAMASHINA Hio
+#
+# Copyright 2006 YAMASHINA Hio
+# -----------------------------------------------------------------------------
+# $Id$
+# -----------------------------------------------------------------------------
+package String::CamelCase;
+
+use warnings;
+use strict;
+
+our $VERSION = '0.02';
+
+use base qw(Exporter);
+our @EXPORT_OK = qw(camelize decamelize wordsplit);
+
+1;
+
+sub wordsplit
+{
+ my $s = shift;
+ split( /[_\s]+|\b|(?<![A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/, $s );
+}
+
+sub camelize
+{
+ my $s = shift;
+ join('', map{ ucfirst $_ } split(/(?<=[A-Za-z])_(?=[A-Za-z])|\b/, $s));
+}
+
+sub decamelize
+{
+ my $s = shift;
+ $s =~ s{([^a-zA-Z]?)([A-Z]*)([A-Z])([a-z]?)}{
+ my $fc = pos($s)==0;
+ my ($p0,$p1,$p2,$p3) = ($1,lc$2,lc$3,$4);
+ my $t = $p0 || $fc ? $p0 : '_';
+ $t .= $p3 ? $p1 ? "${p1}_$p2$p3" : "$p2$p3" : "$p1$p2";
+ $t;
+ }ge;
+ $s;
+}
+
+__END__
+
+=head1 NAME
+
+String::CamelCase - camelcase, de-camelcase
+
+=head1 VERSION
+
+Version 0.01
+
+=head1 SYNOPSIS
+
+ use String::CamelCase qw(camelize decamelize wordsplit);
+ print camelize("some_keyword"); # ==> SomeKeyword
+ print decamelize("SomeKeyword"); # ==> some_keyword
+ print wordsplit("some_keyword"); # ==> (some, keyword)
+ print wordsplit("SomeKeyword"); # ==> (Some, Keyword)
+
+=head1 EXPORT
+
+This module can export two functions, C<camelize> and C<decamelize>.
+
+=head1 FUNCTIONS
+
+=head2 camelize($under_score)
+
+convert from under_score text to CamelCase one.
+
+=head2 decamelize($CamelCase)
+
+convert from CamelCase text to under_score one.
+
+=head2 wordsplit($str)
+
+=head1 AUTHOR
+
+YAMASHINA Hio, C<< <hio at cpan.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-string-camelcase at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=String-CamelCase>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc String::CamelCase
+
+You can also look for information at:
+
+=over 4
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/String-CamelCase>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/String-CamelCase>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=String-CamelCase>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/String-CamelCase>
+
+=back
+
+=head1 SEE ALSO
+
+CamelCase(en.wikipedia.org) L<http://en.wikipedia.org/wiki/CamelCase>
+
+CamelCase(ja.wikipedia.org) L<http://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%83%A1%E3%83%AB%E3%82%B1%E3%83%BC%E3%82%B9>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2006 YAMASHINA Hio, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+# -----------------------------------------------------------------------------
+# End of File.
+# -----------------------------------------------------------------------------
Added: branches/upstream/libstring-camelcase-perl/current/t/00-load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/00-load.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/00-load.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/00-load.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok( 'String::CamelCase' );
+}
+
+diag( "Testing String::CamelCase $String::CamelCase::VERSION, Perl $], $^X" );
Added: branches/upstream/libstring-camelcase-perl/current/t/01-basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/01-basic.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/01-basic.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/01-basic.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,15 @@
+
+use strict;
+use warnings;
+use Test::More tests => 4;
+use String::CamelCase qw(camelize decamelize wordsplit);
+
+# basics.
+is(camelize("some_keyword"), 'SomeKeyword');
+is(decamelize("SomeKeyword"), 'some_keyword');
+is_deeply([wordsplit("some_keyword")], [qw(some keyword)]);
+is_deeply([wordsplit("SomeKeyword")], [qw(Some Keyword)]);
+
+# -----------------------------------------------------------------------------
+# End of File.
+# -----------------------------------------------------------------------------
Added: branches/upstream/libstring-camelcase-perl/current/t/02-more.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/02-more.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/02-more.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/02-more.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,41 @@
+
+use strict;
+use warnings;
+use Test::More tests => 22;
+use String::CamelCase qw(camelize decamelize wordsplit);
+
+# camelcases.
+is(decamelize("HogeMuge"), "hoge_muge");
+is(camelize("hoge_muge"), "HogeMuge");
+
+is(decamelize("AD"), "ad");
+is(decamelize("YearBBS"), "year_bbs");
+is(decamelize("ClientADClient"), "client_ad_client");
+is(decamelize("ADClient"), "ad_client");
+
+is(camelize("ad"), "Ad");
+is(camelize("year_bbs"), "YearBbs");
+is(camelize("client_ad_client"), "ClientAdClient");
+is(camelize("ad_client"), "AdClient");
+
+# split.
+is_deeply([wordsplit("HogeMuge")], [qw(Hoge Muge)]);
+is_deeply([wordsplit("hoge_muge")], [qw(hoge muge)]);
+
+is_deeply([wordsplit("AD")], [qw(AD)]);
+is_deeply([wordsplit("YearBBS")], [qw(Year BBS)]);
+is_deeply([wordsplit("ClientADClient")], [qw(Client AD Client)]);
+is_deeply([wordsplit("ADClient")], [qw(AD Client)]);
+
+is_deeply([wordsplit("ad")], [qw(ad)]);
+is_deeply([wordsplit("year_bbs")], [qw(year bbs)]);
+is_deeply([wordsplit("client_ad_client")], [qw(client ad client)]);
+is_deeply([wordsplit("ad_client")], [qw(ad client)]);
+
+# .
+is(decamelize("_ADClient"), "_ad_client");
+is(decamelize(" _ADClient"), " _ad_client");
+
+# -----------------------------------------------------------------------------
+# End of File.
+# -----------------------------------------------------------------------------
Added: branches/upstream/libstring-camelcase-perl/current/t/boilerplate.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/boilerplate.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/boilerplate.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/boilerplate.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,48 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+sub not_in_file_ok {
+ my ($filename, %regex) = @_;
+ open my $fh, "<", $filename
+ or die "couldn't open $filename for reading: $!";
+
+ my %violated;
+
+ while (my $line = <$fh>) {
+ while (my ($desc, $regex) = each %regex) {
+ if ($line =~ $regex) {
+ push @{$violated{$desc}||=[]}, $.;
+ }
+ }
+ }
+
+ if (%violated) {
+ fail("$filename contains boilerplate text");
+ diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
+ } else {
+ pass("$filename contains no boilerplate text");
+ }
+}
+
+not_in_file_ok(README =>
+ "The README is used..." => qr/The README is used/,
+ "'version information here'" => qr/to provide version information/,
+);
+
+not_in_file_ok(Changes =>
+ "placeholder date/time" => qr(Date/time)
+);
+
+sub module_boilerplate_ok {
+ my ($module) = @_;
+ not_in_file_ok($module =>
+ 'the great new $MODULENAME' => qr/ - The great new /,
+ 'boilerplate description' => qr/Quick summary of what the module/,
+ 'stub function definition' => qr/function[12]/,
+ );
+}
+
+module_boilerplate_ok('lib/String/CamelCase.pm');
Added: branches/upstream/libstring-camelcase-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/pod-coverage.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/pod-coverage.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/pod-coverage.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
Added: branches/upstream/libstring-camelcase-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-camelcase-perl/current/t/pod.t?rev=60654&op=file
==============================================================================
--- branches/upstream/libstring-camelcase-perl/current/t/pod.t (added)
+++ branches/upstream/libstring-camelcase-perl/current/t/pod.t Tue Jul 27 15:39:15 2010
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
More information about the Pkg-perl-cvs-commits
mailing list