Lines Matching refs:class

18 my $class = "Math::BigInt";
168 sub TIESCALAR { my ($class) = @_; bless \$round_mode, $class; }
190 my $class = ref($self) || $self || __PACKAGE__;
198 return ${"${class}::round_mode"} = $m;
200 ${"${class}::round_mode"};
208 my $class = ref($self) || $self || __PACKAGE__;
213 return ${"${class}::upgrade"} = $u;
215 ${"${class}::upgrade"};
223 my $class = ref($self) || $self || __PACKAGE__;
228 return ${"${class}::downgrade"} = $u;
230 ${"${class}::downgrade"};
238 my $class = ref($self) || $self || __PACKAGE__;
245 ${"${class}::div_scale"} = shift;
247 ${"${class}::div_scale"};
254 # Class->accuracy(); class
255 # Class->accuracy($a); class $a
258 my $class = ref($x) || $x || __PACKAGE__;
289 $a = ${"${class}::accuracy"} unless defined $a; # proper return value
293 ${"${class}::accuracy"} = $a; # set global A
294 ${"${class}::precision"} = undef; # clear global P
303 $r = ${"${class}::accuracy"} if !defined $r;
311 # Class->precision(); class
312 # Class->precision($p); class $p
315 my $class = ref($x) || $x || __PACKAGE__;
335 $p = ${"${class}::precision"} unless defined $p; # proper return value
339 ${"${class}::precision"} = $p; # set global P
340 ${"${class}::accuracy"} = undef; # clear global A
349 $r = ${"${class}::precision"} if !defined $r;
356 my $class = shift || 'Math::BigInt';
382 join("','",keys %$args),"' passed to $class\->config()");
388 ${"${class}::_trap_$1"} = ($set_args->{"trap_$1"} ? 1 : 0);
392 $class->$key($set_args->{$key});
401 class => $class,
402 trap_nan => ${"${class}::_trap_nan"},
403 trap_inf => ${"${class}::_trap_inf"},
404 version => ${"${class}::VERSION"},
410 $cfg->{$key} = ${"${class}::$key"};
445 # if two arguments, the first one is the class to "swallow" subclasses
473 my ($class,$wanted,$a,$p,$r) = @_;
476 return $class->bzero($a,$p) if !defined $wanted; # default to 0
477 return $class->copy($wanted,$a,$p,$r)
478 if ref($wanted) && $wanted->isa($class); # MBI or subclass
480 $class->import() if $IMPORT == 0; # make require work
482 my $self = bless {}, $class;
501 || (defined ${"${class}::precision"})
502 || (defined ${"${class}::accuracy"})
523 require Carp; Carp::croak("$wanted is not a number in $class");
547 require Carp; Carp::croak("$wanted not an integer in $class");
567 require Carp; Carp::croak("$wanted not an integer in $class");
582 require Carp; Carp::croak("$wanted not an integer in $class");
603 $self = $class if !defined $self;
609 if (${"${class}::_trap_nan"})
612 Carp::croak ("Tried to set $self to NaN in $class\::bnan()");
637 $self = $class if !defined $self;
643 if (${"${class}::_trap_inf"})
646 Carp::croak ("Tried to set $self to +-inf in $class\::binfn()");
670 $self = $class if !defined $self;
714 $self = $class if !defined $self;
761 my $x = shift; $class = ref($x) || $x; $x = $class->new(shift) if !ref($x);
778 my $x = shift; $class = ref($x) || $x; $x = $class->new(shift) if !ref($x);
793 my $x = shift; $x = $class->new($x) unless ref $x;
835 my $c = ref($self); # find out class of argument(s)
895 my $c = ref($self); # find out class of argument(s)
1212 ($self,$x,$base,@r) = objectify(1,$class,@_);
1914 $x = $class->new($x) unless ref $x;
1949 ($self,$x,$y,@r) = objectify(2,$self || $class,@_);
2059 my $x = shift; $x = $class->new($x) unless ref $x;
2184 my $x = shift; $x = $class->new($x) if !ref($x);
2196 my $x = shift; $x = $class->new($x) if !ref($x);
2217 # If the second arg is a ref, use it as class.
2218 # If not, try to use it as classname, unless undef, then use $class
2227 # $class,1,2. (We can not take '1' as class ;o)
2228 # badd($class,1) is not supported (it should, eventually, try to add undef)
2246 $a[0] = $class;
2259 #print "Now in objectify, my class is today $a[0], count = $count\n";
2298 require Carp; Carp::croak ("$class objectify needs list context");
2772 class The class name of config() you just called
2774 upgrade To which class math operations might be upgraded
2776 downgrade To which class math operations might be downgraded
2784 version version number of the class you used
2833 Note: Works also for subclasses like Math::BigFloat. Each class has it's own
2867 Note: Works also for subclasses like Math::BigFloat. Each class has it's own
3415 C<< Math::BigFloat->accuracy() >> or whatever class you are using.
3491 * Thus you can have the math done by on Math::Big* class in two modi:
3798 The public API must remain consistent, i.e. if a sub-class is overloading
3799 addition, the sub-class must use the same name, in this case badd(). The
3822 from the parent class.
3859 the class Foo::Bar. Usually this is used in conjunction with Math::BigFloat:
3894 arguments are of the class mentioned in $upgrade (This might change in later