in reply to hashref return fails

What is the class of $date_thingy and in which class is sub foo defined? Does the class in which sub foo is defined have a subclass that overrides sub foo? Are there any other things in your code that share the name foo?