in reply to Re: Designing multiple related modules
in thread Designing multiple related modules
In fact, the Bod::Social in example 3 already is kind of a factory class
Yes, it is of sorts.
The first time I came across that methodology was with LWP::Authen::OAuth2 where it seems to work well. It easily allowed me to create a LWP::Authen::OAuth2::ServiceProvider for LinkedIn and allows others to create modules to connect to other social networks. The only disadvantages I see with this is that all the Service Providers get installed, even if they are not needed for the end user's application. Also, in the case of LWP::Authen::OAuth2, the author has to integrate new Service Providers into the distribution. It is quite easy to create a standalone one, as I've done with LinkedIn so I don't see that as a major problem.
|
|---|