Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: use x; equivalent

by chromatic (Archbishop)
on Feb 22, 2006 at 17:52 UTC ( #532043=note: print w/replies, xml ) Need Help??


in reply to use x; equivalent

pack is a Perl keyword, so the parser doesn't know what to do with that construct. I suggest changing the name of your module.

Of course, if the documentation had shown the unbroken way to call class methods, you wouldn't have had this problem:

BEGIN { require pack; pack::->import(); }

Update: fixed the code to use the really unambiguous way.

Replies are listed 'Best First'.
Re^2: use x; equivalent
by unclesmiff (Initiate) on Feb 22, 2006 at 18:13 UTC
    Thank you chromatic et al. I changed the name to packe and it worked.

    I was also wondering how to get debug from the importer, I thought this might work, but no. it doesn't print anything.

    BEGIN { require packe; $Exporter::Verbose=1; import packe; }
Re^2: use x; equivalent
by ikegami (Pope) on Feb 22, 2006 at 18:04 UTC

    Even using your 'unbroken' way, I get

    Not enough arguments for pack at -e line 1, near "pack;" Not enough arguments for pack at -e line 1, near "pack->import" BEGIN not safe after errors--compilation aborted at -e line 1.

    perl v5.6.1

Re^2: use x; equivalent
by vladb (Vicar) on Feb 22, 2006 at 17:57 UTC
    Good catch, chromatic! Gees, however I missed that!..

    (feeling red faced now)
    _____________________
    "We've all heard that a million monkeys banging on a million typewriters will eventually reproduce
    the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." - Robert Wilensky, University of California

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://532043]
help
Chatterbox?
[LanX]: we should certainly avoid Amsterdam! ! !
[marto]: kidding. The area in question isn't great. I'd no idea these facilities existed in that part of town.
LanX vile place ...
[LanX]: well, me was kidding!
[marto]: One of the main train stations is right across the road, so handy from that perspective, and there are some nice hotels in the area, but it's not great after dark, or sometimes during the day to be honest
[LanX]: not easy to find good and affordable venues ...
[marto]: hmm, there are several universities and colleges handy that I'd have thought would offer such services, given this is out of term time, I've no experience of paying for venues :)
[LanX]: OK ...
[LanX]: I have no idea how Mark scouted, giving that he lives in London ... but I think he mentioned his wife being Scottish
[marto]: ah, so this is payback :P

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2017-12-14 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (396 votes). Check out past polls.

    Notices?