WWW::SFDC::Manifest - Utility functions for Salesforce Metadata API interactions.


version 0.37


This module is used to read SFDC manifests from disk, add files to them, and get a structure suitable for passing into WWW::SFDC::Metadata functions.

    my $SFDC = WWW::SFDC->new(...);
    my $Manifest = WWW::SFDC::Manifest
        ->new(constants => $SFDC->Constants)
        ->add({Document => ["bar/foo.png"]});

    my $HashRef = $Manifest->manifest();
    my $XMLString = $Manifest->getXML();



This apiVersion will be written to the manifest .xml file - defaults to 34. Beware that the API version specified in a manifest file overrides the API version specified in the endpoint URL.


A WWW::SFDC::Constants object. If you're working with a session, you'll need to pass in the constants from the session. If you're trying to work offline, you'll need to create a new Constants object explicitly.


If set, the manifest will be constructed slightly differently: when you add a file inside a folder, such as src/email/myfolder/, normally the manifest will include both the folder and the template. However, when deleting, the folder will not be included unless the -meta file is explicitly specified, i.e. src/email/myfolder-meta.xml. This is because deleting the folder will delete all members of that folder, and that's not normally the desired effect.


The underlying hash for the Manifest object. This hashref can be passed into a call to retrieve(), and a WWW::SFDC::Manifest can also be created with this prepopulated, if you already know what it should contain.

This hashref will look like

    classes => [
    email => [



Returns a list of files needed to deploy this manifest. Use this to construct a .zip file.


Adds an existing manifest object or hash to this one.

addList($isDeletion, @list)

Adds a list of components or file paths to the manifest file.

readFromFile $location

Reads a salesforce package manifest and adds it to the current object, then returns it.

writeToFile $location

Writes the manifest's XML representation to the given file and returns the manifest object.


Returns the XML representation for this manifest.


Please report any bugs or feature requests at


You can find documentation for this module with the perldoc command.

    perldoc WWW::SFDC::Manifest

You can also look for information at


Alexander Brett <>


This software is Copyright (c) 2015 by Sophos Limited

This is free software, licensed under:

  The MIT (X11) License

The full text of the license can be found in the LICENSE file included with this distribution.