But it's not going to work inside handlers. Better to use something like this:
property MyLib : document "MyLibrary.scpt"
--use MyLib : script "MyLibrary"
set padded_name to MyLib's lpad("Doekman", 10, "_")
Learned something new again! Either add the line global MyLib or your property-solution. Thanks!
I still can't fully get my head around AppleScript's scoping rules...