There's nothing wrong with putting a module on CPAN that has
the same functionality as an existing module. It's not that
the first person to put something on CPAN is somekind of
super-coder whose code can't be improved. Anyone can upload
something on CPAN, and there isn't any code review. Too often
people give the impression that if it's on CPAN, it has to be
good code. This is not true - there's good code on CPAN, but
there's also a lot of bad code. Code that's broken, inefficient, platform or environment specific, or which has
a lousy API.
If there's a piece of code on CPAN that doesn't do what you
want, or which you consider not up to your standards, by
all means, rewrite it and upload it on CPAN. In the worst
case, all it does it take some diskspace on some CPAN mirrors. But others might agree with you and prefer your
implementation over what's already there, and your contribution will enrich CPAN.
Go for it.