In your first snippet, you are calling the adjust_to_bounding_box method in list context (argument list of a function). In the second snippet, you are calling it in scalar context (assigning to $got). The adjust_to_bounding_box method probably exits with a bare
return statement, which gives different values depending on the context it is called from. You can use
scalar to force scalar context on the method call otherwise in list context.
This is an annoying problem many people encounter with CGI's param method as well.