in reply to weaken is only available with the XS version

You can always check to see if it's there:
#!/usr/bin/perl -l use strict; use warnings; use List::Util::XS; print $List::Util::XS::VERSION;
And here's a bundle to ensure that you have weakly things:
#!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install(qw( Task::Weaken Cache::Weak Class::IntrospectionMethods Class::WeakSingleton Class::Observable Clone::Closure Convert::Scalar Data::Decycle Data::Dump::Streamer Data::Structure::Util Devel::Cycle EO::WeakArray FCGI::EV Hash::NoRef IO::Plumbing Object::InsideOut Memoize::Expire::ByInstance Scalar::Util Set::Object Test::Memory::Cycle Test::NoXS Test::Weaken Test::Weaken::ExtraBits Tie::RefHash Tie::RefHash::Weak Tie::Util Util::Any WeakRef WeakRef::Auto));