Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Restoring the magic to the _ filehandle in Perl 5.8.9

by JavaFan (Canon)
on Jan 27, 2010 at 17:30 UTC ( #819979=note: print w/replies, xml ) Need Help??


in reply to Restoring the magic to the _ filehandle in Perl 5.8.9

I'm using sub _() as a means to localise text
Beside the problem you have with _ having special meaning, the other problem you have is that _ always lives in main. If you would happen to use a module that also defines a sub _, you have a problem.

As for your question of restoring magic to _, I'm afraid I don't know the question. I've used sub _ myself before, and ran into the problem, and the problem I mentioned above. I now no longer use sub _. sub __ doesn't have the mentioned problems.

Replies are listed 'Best First'.
Re^2: Restoring the magic to the _ filehandle in Perl 5.8.9
by clinton (Priest) on Jan 27, 2010 at 17:36 UTC
    All true. I initially used sub _ because I'd seen it used in Jifty and because it is the standard getttext way of marking text for i18n, and it worked, but yes - playing with magic does have issues.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://819979]
help
Chatterbox?
[erix]: or compile & run an instance as yourself (not user 'postgres')
[erix]: easiest setup is to run with PG* env variables set, and a custom .pgpass files (can be a $PGPASSFILE)
[Corion]: Hmm - "trust" sounds interesting, but I have still to find whether I can restrict that on a per-DB level ;)
[Corion]: erix: Sure, but SQLite doesn't even need that :)
[hippo]: Corion: Yes, you can. It's all in the pg_hba.conf
[erix]: yeah, but there is a lot SQLite cannot do :)
[hippo]: Database is the 2nd column.
shmem .oO( docker. docker. docker? docker. docker! docker )
[shmem]: at least, some Ook.
[erix]: another simple Pg thing is to running a database off a tsv (alas, readonly)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2018-02-23 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (302 votes). Check out past polls.

    Notices?