---
name: "Jifty::Object"
section: "3pm"
platform: "linux"
package: "libjifty-perl"
version: "1.10518+dfsg-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Jifty::Object"
---

# Jifty::Object(3pm)

Base class for most of Jifty's objects

## NAME

Jifty::Object - Base class for most of Jifty's objects

## DESCRIPTION

`"Jifty::Object"` is the superclass of most of Jifty's objects.  It is used to provide convenient accessors to important global objects like the database handle or the logger object, while still allowing individual classes to overload these methods.

We ought to be able to mix-in `"Jifty::Object"` with any other class; thus, we will not define `"new"` or `"_init"` in `"Jifty::Object"`.  We do assume, however, that `$self` is a blessed hash reference.

## METHODS

### current\_user \[USER\]

Gets/sets a user for the current user for this object.  You often do not need to call this explicitly; Jifty will inspect your caller's `"current_user"`, and so on up the call stack.

### PRIVATE \_get\_current\_user

Takes the ARGS paramhash passed to \_init. Find the current user. First, try to see if it's explicit. After that, check the caller's current\_user. After that, look at Jifty-\>web-\>current\_user

Fills in current\_user with that value

### log

Returns a Log::Log4perl logger object; the category of the logger is the same as the class of `$self`.
