well, i'm not sure on modules, but i can help you with the logic and codifying of a possible solution. if you take the point X and an arbitrary point A on the perimeter of the polygon, make a line out of these two points it should 1) pass through the perimeter at once more (point B) and 2) be such that X is between A and B. here's the way that will be played out.
first, find the equations for all the line segments of the perimeter (which will consist of the equation for the line and the range over which the variant of the equation will vary to create just the segment). next you find the equation for the line passing through the arbitrary point and the X point (a problem will have to be worked around in the case of X being the same point as the arbitrary point (but if this is the case, you already know that X is in the polygon)). now, find all the points at which this line passes through the perimeter (mathematically, just set the equations of the X-line and each of the perimeter lines equal to each other to find the horizontal coordinate, which you then put into either equation to find the vertical coordinate (will need planning for the case of parallel and equal lines). then, check to make sure that the point is within the range of that part of the perimeter.).
however, at this point, the possibility for weird polygons necessitates some error checking. the points obtained should now be ordered by their distance from the original arbitrary point (from shortest to longest). now, if X lies between the first and the second, it will be inside the polygon. if X is between the second and the third, it is not inside. if X is between the third and the forth... you get it. it will only be necessary to look at one of the coordinates of the comparing points at a time, being as this is taking place on a line, there are only two cases where the coordinates do not vary with each other (horizontal and vertical lines being those cases).
that's it (at least logically). i'm too sleepy to start the code for this right now. try it out for yourself (unless you or someone thinks of a better/quicker/easier way first (who knows? maybe there's a really cool algorithm for just this sort of problem)), and ask if you have problems starting (i'll mark this thread), as i'll likely forget about this by tomarrow. also, if my sleepy brain did not explain this well enough, you can definitely ask for a better one (and you're welcome to include a slap on my wrist for having poorly taught this ^_^).
stillflame out. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."