Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Specializing Functions with Currying

by FoxtrotUniform (Prior)
on Aug 06, 2004 at 00:42 UTC ( #380421=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my @test_data = (
        ['none', 'The quick brown '],
        ['bold', 'dog'], 
        ['none', '.']
  2. or download this
    my %handlers = (
        'none' => sub {shift},
        return $handlers{'para'}->($text);
  3. or download this
    sub wrap_with_html
        'ital' => \&wrap_with_html('i',
        'para' => \&wrap_with_html('p',
  4. or download this
    sub curry
    my $plus_five = &curry(\&foo, 5);
  5. or download this
    sub curry
    print &build_para(\@test_data);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://380421]
Approved by elusion
Front-paged by broquaint
[choroba]: Related to the new release, anyone could explain this or this tester report?
[Discipulus]: hello crew! marto thanks for the message: but I how can I help? i'm testing cpan Padre atm problem with Client::Debug
[choroba]: I don't happen to have 5.10.0 nor 5.8.5 handy...
[Corion]: Hmm - I would say the 5.8.5 is a broken installation / corrupt tarball download, and the 5.10.0 is really weird, and maybe a bug in that version of Perl
[Corion]: I don't see how my $result = eval q{'abc' =~ ?b?}; could create a "Modification of read-only value" error
[marto]: Discipulus the issue that should be adressed is that the page needs to be updated to reflect modern perl on Windows
[Discipulus]: but is really necessary to support these ancient versions? from 5.14 onward is not enough?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2018-06-25 08:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.