Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Re^5: if only blocks were avoidable... (use twice)

by yosefm (Friar)
on Sep 23, 2003 at 20:36 UTC ( #293668=note: print w/replies, xml ) Need Help??

in reply to Re^5: if only blocks were avoidable... (use twice)
in thread if only blocks were avoidable...

I see the problem here, but if I understand your code correctly then I'll have to dispatch every subroutine call to the right module. The problem here is that my module is that import is not the only method called on this module, since it is an object, so import is only used as a class initializer.

Oh, maybe I'll just start every subroutine with a conditional bytes->import. Not lazy enough, I know, but it seems that Laziness doesn't get me much here.

As for what it does, this module creates a multy-level Javascript menu (I'm sure there are some available on CPAN but I didn't find quite what I need and anyway DIY is more fun).

The reason I need 'use bytes' is for documents printed in legacy encodings. It turns out that perl spontaneously converts strings to unicode when some internal functions are used and then you get garbage in the browser. So I want to allow the user of my module to state that he uses legacy encoding and deal with it properly.

  • Comment on Re: Re^5: if only blocks were avoidable... (use twice)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://293668]
Corion resurfaces. I find the Canary Islands always relaxing, at least for 7 days :)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-02-21 20:15 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (287 votes). Check out past polls.