Original question aside:
- using indirect object notation for method calls is advised against; that'd be better written as myproj::DB->new( ... )
- lowercase package names are reserved for use as compiler pragmas; granted "myproj" is probably safe, but it just . . . looks wrong
- Passing the list of args in an arrayref also looks strange. You're building an anonymous array which you're probably going to deference in your new method after copying it from $_[0] anyhow; doesn't make sense to wrap things up in an extra layer (then again there may be a perfectly good reason; but again, looks strange)
As for forcing $var to be a string, if it is it is. There's not really any coercion needed, but if you absolutely must then "$var" would force stringification (but it's usually not needed). Given the other weirdness the problem probably lies elsewhere; as was suggested above make sure that $var contains what you think it does through an extra print or in the debugger.