Where to put common code?

I’m having trouble here.

I’ve written & cribbed code for connecting to an external MySQL database
and for reading site config info into variable and doing other random
things, and (as it was not initially intended to be used anywhere else)
this code is currently stored in and called from User_Local.pm

The problem is, I need to access identical code from the
autohandler/Auth Callback.

Thing is, I’m not sure where I should move this code so that it’s
accessible from both.

Currently, a lot of the code is called by $self->method within
User_Local since they are operations on a user object, but a lot of it
doesn’t need to be as it is user-independent code.

Do I create a new module somewhere? If so, where? As an extension of
another module with overriding? As a random perl file that gets included
from wherever?

Help!

If anyone’s available to natter about it, I should be in #rt on
irc.perl.org all day (Zordrak).

Kind Regards,

Mike Peachey, IT
Tel: +44 114 281 2655
Fax: +44 114 281 2951
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
Comp Reg No: 3191371 - Registered In England
http://www.jennic.com