more flexible perl module naming

- No more presuming 'WWW::' is at the beginning
  (default is now "WWW::SwaggerClient" vs "SwaggerClient" in order
   to accomodate)
- Test that module names Like::This write to the filesystem and in
  the mustache templates properly
This commit is contained in:
David Bartle
2016-01-04 20:38:07 -08:00
parent 54a8ebd7d8
commit 99842f646f
19 changed files with 200 additions and 93 deletions

View File

@@ -17,7 +17,7 @@
# NOTE: This class is auto generated by the swagger code generator program.
# Do not edit the class manually.
#
package WWW::{{moduleName}}::{{classname}};
package {{moduleName}}::{{classname}};
require 5.6.0;
use strict;
@@ -27,8 +27,8 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::{{moduleName}}::ApiClient;
use WWW::{{moduleName}}::Configuration;
use {{moduleName}}::ApiClient;
use {{moduleName}}::Configuration;
use base "Class::Data::Inheritable";
@@ -37,7 +37,7 @@ __PACKAGE__->mk_classdata('method_documentation' => {});
sub new {
my $class = shift;
my (%self) = (
'api_client' => WWW::{{moduleName}}::ApiClient->instance,
'api_client' => {{moduleName}}::ApiClient->instance,
@_
);