Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

number::range(3pm) [debian man page]

Number::Range(3pm)					User Contributed Perl Documentation					Number::Range(3pm)

NAME
Number::Range - Perl extension defining ranges of numbers and testing if a number is found in the range. You can also add and delete from this range. SYNOPSIS
use Number::Range; my $range = Number::Range->new("-10..10,12,100..120"); if ($range->inrange("13")) { print "In range "; } else { print "Not in range "; } $range->addrange("200..300"); $range->delrange("250..255"); my $format = $range->range; # $format will be '-10..10,12,100..120,200..249,256..300' DESCRIPTION
Number::Range will take a description of a range, and then allow you to test on if a number falls within the range. You can also add and delete from the range. RANGE FORMAT The format used for range is pretty straight forward. To separate sections of ranges it uses a "," or whitespace. To create the range, it uses ".." to do this, much like Perl's own binary ".." range operator in list context. METHODS new $range = Number::Range->new("10..20","25..30"); Creates the range object. It will accept any number of ranges as its input. addrange $range->addrange("22"); This will also take any number of ranges as input and add them to the existing range. delrange $range->delrange("10"); This will also take any number of ranges as input and delete them from the existing range. inrange $range->inrange("26"); my @results = $range->inrange("27","200"); This will take one or more numbers and check if each of them exists in the range. If passed a list, and in array context, it will return a list of 0's or 1's, depending if that one was true or false in the list position. If in scalar context, it will return a single 1 if all are true, or a single 0 if one of them failed. range $format = $range->range; @numbers = $range->range; Depending on context this will return either an array of all the numbers found in the range, for list context. For scalar context it will return a range string. size $size = $range->size; This will return the total number of entries in the range. EXPORT None by default. SEE ALSO
Number::Tolerant, Tie::RangeHash, and Array::IntSpan for similar modules. AUTHOR
Larry Shatzer, Jr., <larrysh@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2004-12 by Larry Shatzer, Jr. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-20 Number::Range(3pm)

Check Out this Related Man Page

Gtk2::Range(3)						User Contributed Perl Documentation					    Gtk2::Range(3)

NAME
Gtk2::Range HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Range INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Orientable METHODS
adjustment = $range->get_adjustment $range->set_adjustment ($adjustment) o $adjustment (Gtk2::Adjustment) double = $range->get_fill_level Since: gtk+ 2.12 $range->set_fill_level ($fill_level) o $fill_level (double) Since: gtk+ 2.12 $range->set_increments ($step, $page) o $step (double) o $page (double) boolean = $range->get_inverted $range->set_inverted ($setting) o $setting (boolean) sensitivitytype = $range->get_lower_stepper_sensitivity Since: gtk+ 2.10 $range->set_lower_stepper_sensitivity ($sensitivity) o $sensitivity (Gtk2::SensitivityType) Since: gtk+ 2.10 $range->set_range ($min, $max) o $min (double) o $max (double) boolean = $range->get_restrict_to_fill_level Since: gtk+ 2.12 $range->set_restrict_to_fill_level ($restrict_to_fill_level) o $restrict_to_fill_level (boolean) Since: gtk+ 2.12 boolean = $range->get_show_fill_level Since: gtk+ 2.12 $range->set_show_fill_level ($show_fill_level) o $show_fill_level (boolean) Since: gtk+ 2.12 updatetype = $range->get_update_policy $range->set_update_policy ($policy) o $policy (Gtk2::UpdateType) sensitivitytype = $range->get_upper_stepper_sensitivity Since: gtk+ 2.10 $range->set_upper_stepper_sensitivity ($sensitivity) o $sensitivity (Gtk2::SensitivityType) Since: gtk+ 2.10 double = $range->get_value $range->set_value ($value) o $value (double) PROPERTIES
'adjustment' (Gtk2::Adjustment : readable / writable / construct / private) The GtkAdjustment that contains the current value of this range object 'fill-level' (double : readable / writable / private) The fill level. 'inverted' (boolean : readable / writable / private) Invert direction slider moves to increase range value 'lower-stepper-sensitivity' (Gtk2::SensitivityType : readable / writable / private) The sensitivity policy for the stepper that points to the adjustment's lower side 'restrict-to-fill-level' (boolean : readable / writable / private) Whether to restrict the upper boundary to the fill level. 'show-fill-level' (boolean : readable / writable / private) Whether to display a fill level indicator graphics on trough. 'update-policy' (Gtk2::UpdateType : readable / writable / private) How the range should be updated on the screen 'upper-stepper-sensitivity' (Gtk2::SensitivityType : readable / writable / private) The sensitivity policy for the stepper that points to the adjustment's upper side SIGNALS
value-changed (Gtk2::Range) adjust-bounds (Gtk2::Range, double) move-slider (Gtk2::Range, Gtk2::ScrollType) boolean = change-value (Gtk2::Range, Gtk2::ScrollType, double) ENUMS AND FLAGS
enum Gtk2::ScrollType o 'none' / 'GTK_SCROLL_NONE' o 'jump' / 'GTK_SCROLL_JUMP' o 'step-backward' / 'GTK_SCROLL_STEP_BACKWARD' o 'step-forward' / 'GTK_SCROLL_STEP_FORWARD' o 'page-backward' / 'GTK_SCROLL_PAGE_BACKWARD' o 'page-forward' / 'GTK_SCROLL_PAGE_FORWARD' o 'step-up' / 'GTK_SCROLL_STEP_UP' o 'step-down' / 'GTK_SCROLL_STEP_DOWN' o 'page-up' / 'GTK_SCROLL_PAGE_UP' o 'page-down' / 'GTK_SCROLL_PAGE_DOWN' o 'step-left' / 'GTK_SCROLL_STEP_LEFT' o 'step-right' / 'GTK_SCROLL_STEP_RIGHT' o 'page-left' / 'GTK_SCROLL_PAGE_LEFT' o 'page-right' / 'GTK_SCROLL_PAGE_RIGHT' o 'start' / 'GTK_SCROLL_START' o 'end' / 'GTK_SCROLL_END' enum Gtk2::SensitivityType o 'auto' / 'GTK_SENSITIVITY_AUTO' o 'on' / 'GTK_SENSITIVITY_ON' o 'off' / 'GTK_SENSITIVITY_OFF' enum Gtk2::UpdateType o 'continuous' / 'GTK_UPDATE_CONTINUOUS' o 'discontinuous' / 'GTK_UPDATE_DISCONTINUOUS' o 'delayed' / 'GTK_UPDATE_DELAYED' SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Range(3)
Man Page