Business::Payroll is a series of Perl Modules that provides an API for working with multiple countries federal, state and local taxes. It also supports calculating mileage reimbursement values and can handle adjustment entries. This module is on CPAN.
UPDATE: This module is not being maintained. The tax calculations will not be accurate. If anyone would like to take over maintaining it we would be happy to assist.