If you read the error message, you see that the problem isn't with blocksize. The problem is with $$self{es}. You assume $$self{es} exists, and contains an object - but $$self{es} is undefined, it probably doesn't exist.

From the code given, I cannot deduce what $$self{es} is supposed to be. Or that it even is suposed to exist.

Your lib path might be messed up somehow.
When I got this error, I traced it down to the call to Class::Loader's _load method. For some reason in certain circumstances it quietly fails, leaving a null.
Just an FYI, I explicitly set the object reference, and I'm getting provider errors in Crypt::Random.
I think your only solution is to get it liking the classpath somehow.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other