MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/perl5/vendor_perl/Foomatic/UIElem.pm
# TODO:
# sort by section and process that way
# order dep specific to particular options
# UI constraints
# various common non-UI options
# PJL options?

package Foomatic::UIElem;

# Call with name=>foo, label=>Foo, type=>Boolean or PickOne or PickMany

sub new {
    my ($type, %vals) = @_;
    return bless \%vals;
}

# default=>value
# order_real=>value
# order_section=>value
# order_keyword=>value

sub set {
    my ($this, $var, $val) = @_;
    $this->{$var} = $val;
}


sub add_option {
    my ($this, $option, $label, $ps) = @_;

    $ps =~ s!\r!!g;

    push (@{$this->{'options'}}, 
	  {'option' => $option,
	   'label' => $label,
	   'snippet' => $ps});
}


1;