Perl bless

After saying bless reference [, class], the thingy referred to (by reference) becomes an object in the package class (by default, the current package). This means that a method call on a reference to that thingy will search for the method in package class.

So after

$y = 42;
$x = \$y;
bless $x, 'Foo';
a call of $x->print(11) will be translated to Foo::print($x,11) if Foo::print exists (and if it doesn't, Perl will search for an appropriate method using @Foo::ISA and Foo::AUTOLOAD, as per the usual rules for inheritance).

bless is often the last function called in a constructor (usually the routine Foo::new). As such, it returns its first argument, after blessing.

While typically objects are implemented as hash thingies, as the above example shows any scalar reference can be blessed.

Everything2 users may know that on E2 "bless" is an opcode available to "gods" that allows them to grant other users GP (formerly XP, until November 2008). The bless command differs from the sanctify command available to all users level 11 and higher in that it creates new GP out of thin air, rather than transferring GP from the blesser's account. However, non-administrators may not realize that there are actually several different flavors of blessings on E2. The following are all presently known bless-like commands currently in existence:

bless - The "regular" bless command, this command gives a designated user exactly 10 GP.

superbless - This command allows an administrator to give a user an arbitrary amount of GP, specified by filling in a field.

websterbless - This command is used when a user suggests a *useful* improvement to a Webster 1913 writeup (correcting a typo, adding a hard link, etc.). An administrator who makes the suggested change can then trigger the websterbless command, which awards the user 3 GP and sends them a brief message of thanks from Webby himself.

teddybless - This command is triggered whenever a user is hugged by the Giant Teddy Bear. It awards the hugged user 2 GP.

All of the above increase the recipient's number of Golden Trinkets by one.

There are also two blessing-like actions that can be taken by ordinary users: easter eggs, when thrown at another user in the catbox, grant that user 3 GP, and fireballs thrown in the catbox (by a user Level 15 or higher) grant the recipient 5 GP. In both cases, these are new GP are created out of thin air, just as with a blessing, although no Golden Trinket is awarded.

Longtime E2 users may also remember that at one time, very early in Everything2's history, there was actually a curse command, which subtracted 10 XP from the recipient's account. Deletion of writeups by an editor also originally came with a mini curse of -5 XP. Fortunately however, the gods in their infinite wisdom, realized that Old Testament-style justice was not necessary and in fact counter productive, and these "tools" were removed from E2's code.

Bless (?), v. t. [imp. & p. p. Blessed (#) or Blest; p. pr. & vb. n. Blessing.] [OE. blessien, bletsen, AS. bletsian, bledsian, bloedsian, fr. bld blood; prob. originally to consecrate by sprinkling with blood. See Blood.]


To make or pronounce holy; to consecrate

And God blessed the seventh day, and sanctified it. Gen. ii. 3.


To make happy, blithesome, or joyous; to confer prosperity or happiness upon; to grant divine favor to.

The quality of mercy is . . . twice blest; It blesseth him that gives and him that takes. Shak.

It hath pleased thee to bless the house of thy servant, that it may continue forever before thee. 1 Chron. xvii. 27 (R. V. )


To express a wish or prayer for the happiness of; to invoke a blessing upon; -- applied to persons.

Bless them which persecute you. Rom. xii. 14.


To invoke or confer beneficial attributes or qualities upon; to invoke or confer a blessing on, -- as on food.

Then he took the five loaves and the two fishes, and looking up to heaven, he blessed them. Luke ix. 16.


To make the sign of the cross upon; to cross (one's self).




To guard; to keep; to protect.



To praise, or glorify; to extol for excellences.

Bless the Lord, O my soul: and all that is within me, bless his holy name. Ps. ciii. 1.


To esteem or account happy; to felicitate.

The nations shall bless themselves in him. Jer. iv. 3.


To wave; to brandish.


And burning blades about their heads do bless. Spenser.

Round his armed head his trenchant blade he blest. Fairfax.

⇒ This is an old sense of the word, supposed by Johnson, Nares, and others, to have been derived from the old rite of blessing a field by directing the hands to all parts of it. "In drawing [their bow] some fetch such a compass as though they would turn about and bless all the field."


Bless me! Bless us! an exclamation of surprise. Milton. -- To bless from, to secure, defend, or preserve from. "Bless me from marrying a usurer." Shak.

To bless the doors from nightly harm. Milton.

-- To bless with, To be blessed with, to favor or endow with; to be favored or endowed with; as, God blesses us with health; we are blessed with happiness.


© Webster 1913.

Log in or register to write something here or to contact authors.