You can install these modules again by setting PERL_USE_UNSAFE_INC=1 in your environment while installing.
You can also install locally patched modules with carton by specifying a 'file:///' path in cpanfile: requires 'Foo::Bar', '0.123', url => 'file:///local/path/Foo-Bar-0.123.tar.gz';