Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
"be consistent"
 
PerlMonks  

Re: Quickly changing a function under test in Test::More

by gube (Parson)
on Mar 09, 2006 at 09:18 UTC ( [id://535389]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Quickly changing a function under test in Test::More

Hi try this,

#!/usr/local/bin/perl use strict; use warnings; use Data::Dumper; my %commands = ( 'command1' => { 'description' => "Does something", 'function' => sub { my $var = shift; return "var = $var\n" } } ); my $cmd = 'command1'; print $commands{$cmd}{'function'}->("hello");

It's reference part, to learn more about reference, go through perlref link, above given by duff.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://535389]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.