in reply to Using my version of a cpan module

IMO the approach should be to extend the module you are now trying to modify to, e.g. Unicode::CharName::More. That said, I will use the author's excuse for not posting any more code now: # XXX: could use a binary search, but I am too lazy today... my excuse is that I am going for swimming in a few minutes in the deep blue and with good company.

On the other hand, installing said module failed for me (linux) because dependency Unicode-String-2.09 fails with Can't use 'defined(%hash)' (Maybe you should just omit the defined()?). So perhaps using the charnames haj mentioned could be wiser and if you really need a ublock() function extend said module.

Replies are listed 'Best First'.
Re^2: Using my version of a cpan module
by markong (Pilgrim) on Jul 20, 2019 at 22:34 UTC

    This make more sense: in general if you want to customize some installed module which uses object orientation, you should subclass it and override the relevant bits and pieces.
    This also prevent you the hassle of mantaining a local modified copy of modules and playing with your OS's @INC definition to let perl having access to their location.

      what's best practice for non-object-oriented modules? (like the ones mentioned above.) Do you just use it and then provide your own improved subs which subsume existing ones?