Help for this page

Select Code to Download


  1. or download this
    # Takes a hashref, a key name, and an optional default.
    # Removes that key from the hash, and returns the value or
    ...
        confess("Missing required argument '$arg_name'");
      }
    }
    
  2. or download this
    # Takes a hashref.  Verifies that it is empty
    sub assert_args_done {
    ...
        confess("Unexpected arguments '@left' left over");
      }
    }
    
  3. or download this
    sub some_func {
      my $args = { @_ };
    ...
      assert_args_done($args);
      # Rest of the code here.
    }