in reply to This might not be in the spirit of iTIMTOWTDI/i, but...

  1. no, only one __DATA__ is allowed. however, different perlmods are allowed different __DATA__s.
  2. you cannot load them with a $var because they are compiled in in the BEGINning. I had the same problem. use this require $module; import $module; which is what use does except that its precompiled.
  3. I don't think you can pipe pics embedded in HTML, if that's what you mean. But you can cache the pics (if the mod allows that) and send through when the browser asks for it. For this, you need an elaborate cacheing scheme. perhaps fastcgi?

AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.

Replies are listed 'Best First'.
RE: Re: This might not be in the spirit of iTIMTOWTDI/i
by merlyn (Sage) on Oct 07, 2000 at 01:27 UTC
    The sequence require $module doesn't work if $module contains colons. I think there's another node here somewhere that I wrote to show how to do this with the right BEGIN{} block around it. But super search isn't super enough for me to find it quickly.

    -- Randal L. Schwartz, Perl hacker


      eval "require $module";

      if $module contains colons

      except that (at least in my program) my module name was determined after reading in a file at runtime. It's easy enough to do if you push the path onto the @INC. Anyway, a quick split for colons would take care to push yet another path on the poor @INC :-O so the end justifies the means.
      AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.