BrowserUk , huge thanks for this !
I've tested Inline:C version and it works almost the same way as XS. For me big adventage of Inline:C is the fact that code is more visable and well separated.
But I didn't mentioned why I am looking for another way of produce dynamic libraries (.so) if I already have XS solution.
The answer is .so file size. With XS and Inline::C I get .so file size aprox. 50 kb (suprisingly big for just one C function !) I have seen other people .so with much more complex code involved several function with just 10-20 Kb size.
Well, why even simple .so weight so much ? How to slim it down ? ;)