protected void processFileContents(List<String> fileLines, String filePath, Engine engine) throws AnalysisException {
        fileLines.stream()
                .map(fileLine -> fileLine.split("(,|=>)"))
                .map(requires -> {
                    //LOGGER.debug("perl scanning file:" + fileLine);
                    final String fqName = requires[0].substring(8)
                            .replace("'", "")
                            .replace("\"", "")
                            .trim();
                    final String version;
                    if (requires.length == 1) {
                        version = "0";
                    } else {
                        final Matcher matcher = VERSION_PATTERN.matcher(requires[1]);
                        if (matcher.find()) {
                            version = matcher.group(1);
                        } else {
                            version = "0";
                        }
                    }
                    final int pos = fqName.lastIndexOf("::");
                    final String namespace;
                    final String name;
                    if (pos > 0) {
                        namespace = fqName.substring(0, pos);
                        name = fqName.substring(pos + 2);
                    } else {
                        namespace = null;
                        name = fqName;
                    }
                    final Dependency dependency = new Dependency(true);
                    final File f = new File(filePath);
                    dependency.setFileName(f.getName());
                    dependency.setFilePath(filePath);
                    dependency.setActualFilePath(filePath);
                    dependency.setDisplayFileName("'" + fqName + "', '" + version + "'");
                    dependency.setEcosystem(Ecosystem.PERL);
                    dependency.addEvidence(EvidenceType.VENDOR, "cpanfile", "requires", fqName, Confidence.HIGHEST);
                    dependency.addEvidence(EvidenceType.PRODUCT, "cpanfile", "requires", fqName, Confidence.HIGHEST);
                    dependency.addEvidence(EvidenceType.VERSION, "cpanfile", "requires", version, Confidence.HIGHEST);
                    Identifier id = null;
                    try {
                        //note - namespace might be null and that's okay.
                        final PackageURL purl = PackageURLBuilder.aPackageURL()
                                .withType("cpan")
                                .withNamespace(namespace)
                                .withName(name)
                                .withVersion(version)
                                .build();
                        id = new PurlIdentifier(purl, Confidence.HIGH);
                    } catch (MalformedPackageURLException ex) {
                        LOGGER.debug("Error building package url for " + fqName + "; using generic identifier instead.", ex);
                        id = new GenericIdentifier("cpan:" + fqName + "::" + version, Confidence.HIGH);
                    }
                    dependency.setVersion(version);
                    dependency.setName(fqName);
                    dependency.addSoftwareIdentifier(id);
                    //sha1sum is used for anchor links in the HtML report
                    dependency.setSha1sum(Checksum.getSHA1Checksum(id.getValue()));
                    return dependency;
                }).forEachOrdered(engine::addDependency);
    }
@Test
    public void testProcessDefaultZero() throws AnalysisException {
        Dependency d = new Dependency();
        List<String> dependencyLines = Arrays.asList(new String[]{
            "requires 'JSON'",});
        PerlCpanfileAnalyzer instance = new PerlCpanfileAnalyzer();
        Engine engine = new Engine(getSettings());
        instance.processFileContents(dependencyLines, "./cpanfile", engine);

        assertEquals(1, engine.getDependencies().length);
        Dependency dep = engine.getDependencies()[0];
        assertEquals("'JSON', '0'", dep.getDisplayFileName());
        assertEquals("0", dep.getVersion());
        assertEquals("pkg:cpan/JSON@0", dep.getSoftwareIdentifiers().iterator().next().getValue());
    }