Here's another way to do it! Use MooseX::Deprecated :-)
with "MooseX::Deprecated" => {
attributes => [ "id_generator" ],
};
I wrote MooseX::Deprecated inspired by my previous answer to this question. It encapsulates the application of method modifiers, checking init_args, fiddling with %Carp::Internal
and warnings::enabled
, all into one tidy little package.