JavaBeans are very simillar to Perl Modules. They are small pieces of code that are maintained separately and usually serve a simple purpose. For example, say I have a web page that accesses a database. I can put all the specifics for that database conection in a bean. Now my web page can use JSP to run that code without having to know/expose the details of the database connection to anyone. You can accomplish the same goal by writing your own modules.
But EJB has this design objective of location transparency.
It's based on some RPC and naming service. I don't see
a basic Perl module mechanism would be able to support
this.