The Artima Developer Community
Sponsored Link

Java Buzz Forum
Listing of core modules per Perl release?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chris Winters

Posts: 931
Nickname: cwinters
Registered: Jul, 2003

Daytime: Java hacker; nighttime: Perl hacker; sleeptime: some of both.
Listing of core modules per Perl release? Posted: Oct 12, 2004 6:29 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Chris Winters.
Original Post: Listing of core modules per Perl release?
Feed Title: cwinters.com
Feed URL: http://www.cwinters.com/search/registrar.php?domain=jroller.com®istrar=sedopark
Feed Description: Chris Winters on Java, programming and technology, usually in that order.
Latest Java Buzz Posts
Latest Java Buzz Posts by Chris Winters
Latest Posts From cwinters.com

Advertisement

I could have sworn I saw a reference to a document or set of documents listing the modules packaged with each Perl release, but I cannot find it. Anybody remember this? (I could instead be remembering that people were talking about creating such a document...)

Why do I need such a thing? In the recent Workflow release I added functionality to create inline conditions. So instead of determining whether you can access an action within a state by executing a known method on an object:

# in workflow.xml
<workflow>...
    <state name="foo">...
        <action name="bar">...
            <condition name="checkTime" />
        </action>
    </state>
</workflow>
  
# in condition.xml
<conditions>
    <condition name="checkTime" class="MyApp::Condition::CheckTime" />
</conditions>

You can now inline the condition using Perl:

# in workflow.xml
<workflow>...
    <state name="foo">...
        <action name="bar">...
            <condition test="$context->{time} < time" />
        </action>
    </state>
</workflow>
 
# nothing needed in condition.xml! 

Useful. But I didn't want to expose a gaping security hole by using string eval to execute what's in 'test'. (Don't know why that's bad? I could set 'test' to "system( 'rm -rf /' )"...) So I looked into Safe. It seemed to work pretty well, although passing a workflow or context object into the safe compartment was a headache so I just normalized everything to a hashref.

From the online docs you can tell that Safe is packaged with Perl. But how far back did that go? I didn't want to leave out users of 5.6.x unless absolutely necessary. So after googling around a while I couldn't find a resource with all the modules listed per release, so I just went to the source, grabbed 5.004 and unpacked it. Sure enough, there's ext/Opcode/Safe.pm -- if it's in 5.004, that's good enough for me.

Read: Listing of core modules per Perl release?

Topic: Spring 1.1.1 Released Previous Topic   Next Topic Topic: Poetry about Java?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use