Payroll.pm

The Payroll module's new method will call Payroll::XML::Parser modules to change the XML input into the Perl data object (Payroll::XML::Data) that the countries can then work with. The process() method will then call the proper country module passing in the data object and the output object/hash. The resulting object is the XML module Payroll::XML::Output. Calling the generate() method will create the output XML document.  Pass in a list of supported countries to the Parser.

methods

PayrollObject new()
string process(string => $data, file => $file, outFile => $outputFile)
  string will take precedence over file,  
  if outFile is given it will try to output to a file of that name and the return string will be undef if error or 1 for success
  if no outputFile is given the return string will be the output

string errorMessage()
string didErrorOccur()

variables
periods = hash of daily, monthly, etc
Countries = hash of US #eventually this should check the Perl Tree (maybe an ls) and gather all installed Countries


sub process
{
  #validate inputs
  #run XML validation
 #run XML parser
  #use resulting Perl Object to process data
    #for each person
      #for each country
        #for each state
           #for each local
  #run XML parser on resulting perl Object to convert back to XML
  #if outFile ne ""
     # attempt to write to file
  #else
    #return XML
}