Skip to content

Commit

Permalink
Fixed incorrect names
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwills committed May 26, 2012
1 parent c1be89f commit 9516f67
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 52 deletions.
47 changes: 27 additions & 20 deletions Build.PL
Expand Up @@ -3,26 +3,33 @@ use warnings;
use Module::Build;

my $builder = Module::Build->new(
module_name => 'W3C::SOAP::Parse::XSD',
license => 'perl',
dist_author => 'Ivan Wills <ivan.wills@gmail.com>',
dist_version_from => 'lib/W3C/SOAP/Parse/XSD.pm',
requires => {
'perl' => 5.008,
},
build_requires => {
'Test::More' => 0,
'Test::NoWarnings' => 0,
},
add_to_cleanup => [ 'W3C-SOAP-Parse-XSD-*' ],
create_makefile_pl => 'traditional',
create_license => 1,
meta_merge => {
resources => {
repository => 'git://github.com/ivanwills/W3C-SOAP-Parse-XSD.git',
bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=W3C::SOAP::Parse::XSD',
},
},
module_name => 'W3C::SOAP::XSD',
license => 'perl',
dist_author => 'Ivan Wills <ivan.wills@gmail.com>',
dist_version_from => 'lib/W3C/SOAP/XSD.pm',
requires => {
'perl' => 5.008,
'XML::LibXML' => 0,
'Moose' => 1,
},
build_requires => {
'Test::More' => 0,
'Test::NoWarnings' => 0,
},
share_dir => {
dist => [
'templates',
],
},
add_to_cleanup => [ 'W3C-SOAP-XSD-*' ],
create_makefile_pl => 'traditional',
create_license => 1,
meta_merge => {
resources => {
repository => 'git://github.com/ivanwills/W3C-SOAP-XSD.git',
bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=W3C::SOAP::XSD',
},
},
);

$builder->create_build_script();
2 changes: 1 addition & 1 deletion Changes
@@ -1,4 +1,4 @@
Revision history for W3C-SOAP-Parse-XSD
Revision history for W3C-SOAP-XSD

0.0.1 Date/time
First version, released on an unsuspecting world.
Expand Down
38 changes: 20 additions & 18 deletions LICENSE
@@ -1,4 +1,4 @@
This software is copyright (c) 2010 by Ivan Wills <ivan.wills@gmail.com>.
This software is copyright (c) 2012 by Ivan Wills <ivan.wills@gmail.com>.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Expand All @@ -12,21 +12,22 @@ b) the "Artistic License"

--- The GNU General Public License, Version 1, February 1989 ---

This software is Copyright (c) 2010 by Ivan Wills <ivan.wills@gmail.com>.
This software is Copyright (c) 2012 by Ivan Wills <ivan.wills@gmail.com>.

This is free software, licensed under:

The GNU General Public License, Version 1, February 1989

GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989

Copyright (C) 1989 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
51 Franklin St, Suite 500, Boston, MA 02110-1335 USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
Expand Down Expand Up @@ -67,7 +68,7 @@ authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any program or other work which
Expand Down Expand Up @@ -185,7 +186,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand All @@ -207,9 +208,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

Appendix: How to Apply These Terms to Your New Programs
Appendix: How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
Expand All @@ -235,8 +236,9 @@ the exclusion of warranty; and each file should have at least the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA


Also add information on how to contact you by electronic and paper mail.

Expand Down Expand Up @@ -270,7 +272,7 @@ That's all there is to it!

--- The Artistic License 1.0 ---

This software is Copyright (c) 2010 by Ivan Wills <ivan.wills@gmail.com>.
This software is Copyright (c) 2012 by Ivan Wills <ivan.wills@gmail.com>.

This is free software, licensed under:

Expand All @@ -290,21 +292,21 @@ Definitions:

- "Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
textual modification.
- "Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
Holder.
- "Copyright Holder" is whoever is named in the copyright or copyrights for
the package.
the package.
- "You" is you, if you're thinking about copying or distributing this Package.
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
received it.

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
Expand Down
13 changes: 12 additions & 1 deletion MANIFEST
Expand Up @@ -6,7 +6,14 @@ MANIFEST.SKIP
META.yml
Makefile.PL
README
lib/W3C/SOAP/Parse/XSD.pm
bin/xsd-parser
lib/W3C/SOAP/XSD.pm
lib/W3C/SOAP/XSD/Document.pm
lib/W3C/SOAP/XSD/Document/ComplexType.pm
lib/W3C/SOAP/XSD/Document/Element.pm
lib/W3C/SOAP/XSD/Document/Node.pm
lib/W3C/SOAP/XSD/Document/SimpleType.pm
lib/W3C/SOAP/XSD/Traits.pm
t/00-load.t
t/boilerplate.t
t/critic.t
Expand All @@ -15,3 +22,7 @@ t/pod-coverage.t
t/pod.t
t/perlcriticrc
t/spelling.t
templates/xsd.pm.tt
templates/xsd_base.pm.tt
templates/xsd_element.pm.tt
META.json
4 changes: 3 additions & 1 deletion MANIFEST.SKIP
Expand Up @@ -60,4 +60,6 @@ Debian_CPANTS.txt
\bnytprof*

# Avoid archives of this distribution
\bW3C-SOAP-Parse-XSD-[\d\.\_]+
\bW3C-SOAP-XSD-[\d\.\_]+
errors.err
tags
14 changes: 7 additions & 7 deletions README
@@ -1,4 +1,4 @@
W3C-SOAP-Parse-XSD
W3C-SOAP-XSD

The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
Expand All @@ -25,24 +25,24 @@ SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.

perldoc W3C::SOAP::Parse::XSD
perldoc W3C::SOAP::XSD

You can also look for information at:

RT, CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=W3C-SOAP-Parse-XSD
http://rt.cpan.org/NoAuth/Bugs.html?Dist=W3C-SOAP-XSD

AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/W3C-SOAP-Parse-XSD
http://annocpan.org/dist/W3C-SOAP-XSD

CPAN Ratings
http://cpanratings.perl.org/d/W3C-SOAP-Parse-XSD
http://cpanratings.perl.org/d/W3C-SOAP-XSD

Search CPAN
http://search.cpan.org/dist/W3C-SOAP-Parse-XSD/
http://search.cpan.org/dist/W3C-SOAP-XSD/

Source Code
git://github.com/ivanwills/W3C-SOAP-Parse-XSD.git
git://github.com/ivanwills/W3C-SOAP-XSD.git

COPYRIGHT AND LICENCE

Expand Down
20 changes: 19 additions & 1 deletion bin/xsd-parser
Expand Up @@ -18,7 +18,9 @@ use Data::Dumper qw/Dumper/;
use English qw/ -no_match_vars /;
use FindBin qw/$Bin/;
use Path::Class;
use Template;
use W3C::SOAP::XSD::Document;
use File::ShareDir qw/dist_dir/;

our $VERSION = version->new('0.0.1');
my ($name) = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs;
Expand Down Expand Up @@ -49,7 +51,6 @@ sub main {
'help',
'VERSION!',
) or pod2usage(2);
#my $file = join ' ', @ARGV;

if ( $option{'VERSION'} ) {
print "$name Version = $VERSION\n";
Expand All @@ -65,9 +66,26 @@ sub main {
# do stuff here
my $file = shift @ARGV;
my @xsd = (W3C::SOAP::XSD::Document->new( location => $file, ns_module_map => $option{ns} ));
my $template = Template->new(
INCLUDE_PATH => dist_dir('W3C-SOAP-XSD'),
INTERPOLATE => 0,
EVAL_PERL => 1,
);

while ( my $xsd = shift @xsd ) {
print "Namespace = " . $xsd->target_namespace . "\n";
my $file = $xsd->get_module_base($xsd->target_namespace);
$file =~ s{::}{/}g;
$file = file $file;
my $parent = $file->parent;
my @missing;
while ( !-d $parent ) {
push @missing, $parent;
$parent = $parent->parent;
}
mkdir $_ for reverse @missing;

$template->process('xsd.pm.tt', {xsd => $xsd}, "$file.pm");
print "Imports:\n";
for my $type ( @{ $xsd->imports } ) {
print "\t", $type->target_namespace, "\n";
Expand Down
4 changes: 2 additions & 2 deletions t/00-load.t
Expand Up @@ -6,7 +6,7 @@ use Test::More tests => 1 + 1;
use Test::NoWarnings;

BEGIN {
use_ok( 'W3C::SOAP::Parse::XSD' );
use_ok( 'W3C::SOAP::XSD' );
}

diag( "Testing W3C::SOAP::Parse::XSD $W3C::SOAP::Parse::XSD::VERSION, Perl $], $^X" );
diag( "Testing W3C::SOAP::XSD $W3C::SOAP::XSD::VERSION, Perl $], $^X" );
2 changes: 1 addition & 1 deletion t/boilerplate.t
Expand Up @@ -52,5 +52,5 @@ TODO: {

}

module_boilerplate_ok('lib/W3C-SOAP-Parse-XSD/t/boilerplate.t.pm');
module_boilerplate_ok('lib/W3C-SOAP-XSD/t/boilerplate.t.pm');

0 comments on commit 9516f67

Please sign in to comment.