Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

RE: Automatic CODE-tag creation (Prototype)

by swiftone (Curate)
on Jun 21, 2000 at 20:40 UTC ( [id://19272]=note: print w/replies, xml ) Need Help??


in reply to Automatic CODE-tag creation (Prototype)
in thread Automatic CODE tags

The Perl Gods have said that the Perl interpreter is the best way to interpret Perl, so I'm still thinking that something that works with that would work better. After some testing though, I've discovered that the Safe Module will not do what I wanted. What we really need is the perl -c command function. I know nothing about the guts of perl, but there should be someway to access this. Do any of the Perl Gods have ideas?
  • Comment on RE: Automatic CODE-tag creation (Prototype)

Replies are listed 'Best First'.
RE: RE: Automatic CODE-tag creation (Prototype)
by Ozymandias (Hermit) on Jun 21, 2000 at 20:45 UTC
    What about something as simple as calling the perl interpreter with a system call? Something as simple as this:
    qx {perl -c $function_to_be_executed}
    It's clumsy, yes, but it should work.

    - Ozymandias

      Overhead of calling a system process. If we're doing this for every post, PM would grind to a halt. The function is already loaded in memory, we just have to learn how to call it.

      I'll work up some demo code like this, but without that efficiency, it isn't worth inserting.

RE: RE: Automatic CODE-tag creation (Prototype)
by Corion (Patriarch) on Jun 22, 2000 at 01:39 UTC

    I also know that the only thing that can determine if some sequence of characters is valid Perl is Perl itself, but the main idea is to have some heuristics to format posts by people who don't know how to use the site ...

    This is not thought as a general Perl formatter, but only for quick weeding of AM posts.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-23 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found