(function(env) {
    env.ddg_spice_meta_cpan = function(api_response) {
        "use strict";

        if (!(api_response && api_response.author && api_response.version)) {
            return;
        }

        var query = DDG.get_query().replace(/\s*(metacpan|meta cpan|cpanm?)\s*/i, '').replace(/-/g, '::');
        var link = "search?q=" + encodeURIComponent(query);
        if (api_response.module && api_response.module.length > 0 && api_response.module[0].associated_pod) {
            link = "module/" + api_response.module[0].associated_pod;
        }

        Spice.add({
            id: "meta_cpan",
            name: "MetaCPAN",
            data: {response: api_response, list: ['Abstract','Author','Version','Description']},
            meta: {
                sourceName: "MetaCPAN",
                sourceUrl: 'https://metacpan.org/' + link,
            },

            normalize : function(item) {
                var desc = item.response.pod;
                return {
                    'Author': item.response.author || null,
                    'Description': ((desc.length > 340) ? desc.slice(0, 340) + ' ...' : null),
                    'Version': item.response.version || null,
                    'Abstract': item.response.abstract || null
                };
            },
            templates: {
                detail: DDG.templates.table_detail,
            }
        });
    }
}(this));

// we need a helper to access the parent context
// to get the results from the normalize function
Handlebars.registerHelper('getNormalize', function(val) {
    for(entry in val){
        if(entry == this){
            return val[entry];
        }
    }
});

// check to see if the normalize function returned 
// an entry (not null) for a given value
Handlebars.registerHelper('checkNormalize', function(val) {
    for(entry in val){
        if(entry == this && val[entry]){
            return true;
        }
    }
    return false;
});

@@ -1416,267 +1416,202 @@
 );%0A%0A
-// we need a helper to access the parent context%0A// to get the results from the normalize function%0AHandlebars.registerHelper('getNormalize', function(val) %7B%0A    for(entry in val)%7B%0A        if(entry == this)%7B%0A            return val%5Bentry%5D;%0A        %7D%0A    %7D%0A%7D);%0A%0A
+%0AHandlebars.registerHelper('table-each', function(list, data) %7B%0A    var return_string = %22%22;%0A%0A    // list is the list of display names sent along with the api data%0A    for(item in list)%7B%0A        
 // c
@@ -1625,20 +1625,16 @@
  see if 
-the 
 normaliz
@@ -1639,215 +1639,302 @@
 ize 
-function returned %0A// an entry (not null) for a given value%0AHandlebars.registerHelper('checkNormalize', function(val) %7B%0A    for(entry in val)%7B%0A        if(entry == this && val%5Bentry%5D)%7B%0A            return true
+returned something, i.e. not null%0A        // and add it to the table%0A        if(data%5Blist%5Bitem%5D%5D)%7B%0A        return_string += '%3Ctr%3E%3Ctd style=%22text-align: right; vertical-align: top; padding-right: 10px; font-weight: bold%22%3E'%0A            + list%5Bitem%5D + '%3C/td%3E%3Ctd%3E' + data%5Blist%5Bitem%5D%5D + '%3C/td%3E%3C/tr%3E'
 ;%0A  
@@ -1962,15 +1962,22 @@
 urn 
-false
+return_string
 ;%0A%7D);
-%0A

update helper