Eg1
SQL> create or replace package foo2
2 as
3 bar NUMBER := 1;
4 end foo2;
5 /
Package FOO2 compiled
SQL> ddl foo2
CREATE OR REPLACE PACKAGE "HR"."FOO2"
as
bar NUMBER := 1;
end foo2;
/
SQL>

I note the create or replace bit doesn't exist in the user_source view, so maybe this is expected..
Eg1
I note the
create or replacebit doesn't exist in theuser_sourceview, so maybe this is expected..