Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Inline Files

by ambs (Pilgrim)
on Sep 05, 2007 at 20:46 UTC ( #637259=perlquestion: print w/replies, xml ) Need Help??

ambs has asked for the wisdom of the Perl Monks concerning the following question:

Hi

Kwiki uses a module to extract files from a PM file (using the DATA section of the file), but that module is not properly easy to use (cannon for a fly).

Is there any other I can use?

Alberto Simões

Replies are listed 'Best First'.
Re: Inline Files
by Joost (Canon) on Sep 05, 2007 at 20:55 UTC
      Ok, I should have explained it better.

      I just want to have a .pm file where __DATA__ is:

      __DATA__
      ==foo.jpg==
      687682423AB628734FE274273894  (base64 dump)
      ==foo.html==
      <html>
      <head>
      </head>
      </html>
      
      and in the pm code I want to do things as:
      writefile($dir, "foo.jpg");
      
      I know this is quite easy to do. But probably there is a module for that already.

      Alberto Simões

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-10-05 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (20 votes). Check out past polls.

    Notices?