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.


In reply to Re^2: Designing multiple related modules by Bod
in thread Designing multiple related modules by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.