the OBJECT_NAME function has a second , optional parameter for the db_id for exactly this reason;
this works in 2005 and above;
sp_msforeachdb '
select
object_name(s.object_id,db_id(''?'')),
s.*, p.*
from ?.sys.sql_modules s
inner join ?.sys.procedures p
on s.object_id = p.object_id'
the schema_name() function does not have the optional parameter in 2005, so if you need the schema (assuming you have otehrs than dbo) that might take some more work.
Lowell