fix file.separator in replaceall (perl)

This commit is contained in:
wing328
2016-01-15 15:47:40 +08:00
parent e0738d2bc6
commit cbbb48a4e4
5 changed files with 153 additions and 12 deletions

View File

@@ -14,6 +14,7 @@ import io.swagger.models.properties.Property;
import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import java.util.regex.Matcher;
import org.apache.commons.lang.StringUtils;
@@ -21,7 +22,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
public static final String MODULE_NAME = "moduleName";
public static final String MODULE_VERSION = "moduleVersion";
protected String moduleName = "WWW::SwaggerClient";
protected String modulePathPart = moduleName.replaceAll("::",String.valueOf(File.separatorChar));
protected String modulePathPart = moduleName.replaceAll("::", Matcher.quoteReplacement(File.separator));
protected String moduleVersion = "1.0.0";
public PerlClientCodegen() {