To get around this problem, I started building up a library of non-work related code that I've done at home on my own time as a sort of portfolio I could show to other potential employers (should the need arise). The only problem with this approach is that it takes time to develop anything worthwhile

In your case you are able to do this. Problems occur where people sign-on with companies that stipulate that we own everything:

Does everyone get a legal opinion on the contracts or new jobs they sign up for?

This is a disadvantage of working for propriortry software companies that stupulate such rules. Of course on the other hand IP is exactly what companies see as a $$$ value in software and the reason they hire in the first place. I guess your solution works for you.

Another way could be with your specific domain knowledge create a CPAN module and become the code owner with GPL over the code. Then negotiate a license over the code for commercial use and enhancements.


In reply to ownership of code by g00n
in thread Code Samples and Previous Employers by friedo

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.