YAML::PP - Only load certain classes
use YAML::PP;
use YAML::PP::Schema::Perl;
my $perl = YAML::PP::Schema::Perl->new(
classes => [qw/ My::Class::X My::Class::Y /],
);
my $yp = YAML::PP->new(
# enable references, regexes and objects
schema => ['+', $perl],
);