<caveat type="I am not a lawyer">
The situation in California is much more benign. You're protected for work that you do on your own time, with your own equipment, that doesn't rely on non-public information gleaned from your employement. You can be further protected by an employment agreement.
Every place I've worked in Silicon Valley over the the past 20 years has had some form of "Intellectual Property" agreement that they require employees to sign. Some of these were benign, and reaffirmed that anything you did on behalf of the company on their time and equipment was theirs, and what you did on your own time was yours. But over the past decade, the gradual drift has been toward the more Draconian, because this is what lawyers are advising companies to do. The opening bid is now often "we own you." The trick is to realize that this is most often the company's initial position in a negotiation, and that pushback is possible.
Here's what's worked for me:
- Ask for a copy of their Intellectual Property Agreement before you accept the job. Once you sign on, your negotiating leverage is greatly reduced. Plus, asking in advance signals that you're savvy.
- Make a list of what you want to protect. Do you want the freedom to contribute to CPAN on your own time? Do you want the freedom to contribute to an Open Source project? The freedom to write articles? Make a list.
- Protect your existing Intellectual Property. Make a list of what you've already done, or have in progress, so that there's a written record of what you're staking prior claim to. Most companys (in Silicon Valley, at least) will ask for such a list, so be prepared.
- Update the Agreement. Strike out parts you aren't willing to abide by, and be prepared to offer a story about why this isn't going to be a problem for the company.
- Make a low-key Counter. I've found that a low profile counter works best. Hand back a marked up, signed copy of the IP agreement, and say "Here's what I'll agree to. Please look this over," and leave it at that. In 6 out of 7 times I've done this, there's been no pushback. End of story. In only one case, my most recent employer, has a company countered. I was ready with a story about how my side project wouldn't compete with their business objectives, and how it actually enhanced the skill set I was bringing to the table, and they agreed.
- Think through what you're willing to give up. The quickest way to feeled screwed by a negotiation is to go into it without knowing what your limits are, and find yourself pushed past them.
- Be prepared to use Judo. If they say "our lawyers insist that you sign this," ask "do you work for your lawyers, or do they work for you?" If thay come at you with "we don't want our employees to have side jobs," counter with "contributing to the Perl community isn't a job. It's education. Do you want employees who don't take care about their own education?"
This has worked for me, in Silicon Valley. That's not to say that there are lots of unreasonable employers out there this wouldn't have worked with. YMMV.