Adding packages to CPAN packages list

Hi,
fairly new to NixOS and was tyring to run a perl script that uses a module that is not in nixpkgs. I tried to follow the steps described here:
https://nixos.wiki/wiki/Perl
under ‘Adding something from CPAN to nixpkgs’.
I was able to modify the perl-packages.nix in a local clone of the nixpkgs repo, and build using nix-build -A perlPackages.StringTrigram (thats the package). But then I still cannot load the package, from what I gather since the expected version is slightly different? I have Perl 5.38.0 on my system, and the package seems to have been built for 5.38.2.
So I cannot test this yet - any ideas on how to proceed?
Thanks
Julian