ezhi/javascript-v8 — comment on commit 71f20bb5f401235cd02c3799b05c98f93b92c2c8
File:  line 0
By dgl:

It might also be interesting to consider something like Package::Anon, it doesn't really *need* the JavaScript to supply an actual class name I don't think, then the JS doesn't even need knowledge of what the Perl package name is.

(Although obviously this is a good start, and I'll happily apply it with one of the options you mention implemented -- I'm just a little scared of introducing too many things like this and then finding the API needs to change.)