Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re(2): what does shift do?

by dmmiller2k (Chaplain)
on May 19, 2002 at 20:41 UTC ( [id://167708]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: what does shift do?
in thread what does shift do?

Because $r is being used as an object, by calling its send_http_header() and print() methods. Without the shift (I presume this is inside a subroutine), the object represented by the reference $r would never be referenced and the code would not work.

P.S., without seeing the context in which your example lives, it I do not exactly know what kind of object $r is , but from its method names, I suspect it's one of the Http::XXX'en.

dmm

If you GIVE a man a fish you feed him for a day
But,
TEACH him to fish and you feed him for a lifetime

Replies are listed 'Best First'.
Re: Re(2): what does shift do?
by Juerd (Abbot) on May 19, 2002 at 20:52 UTC

    P.S., without seeing the context in which your example lives, it I do not exactly know what kind of object $r is , but from its method names, I suspect it's one of the Http::XXX'en.

    The context is mod_perl, and probably Apache::Registry, which wraps scripts in subs for caching.

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://167708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found