base.al

来自「美国CMU大学开发的操作系统健壮性评测软件」· AL 代码 · 共 29 行

AL
29
字号
# NOTE: Derived from ./blib/lib/URI/URL.pm.  Changes made here will be lost.package URI::URL;# Access some attributes of a URL object:sub base {    my $self = shift;    my $base  = $self->{'_base'};    if (@_) { # set	my $new_base = shift;	$new_base = $new_base->abs if ref($new_base);  # unsure absoluteness	$self->{_base} = $new_base;    }    return unless defined wantarray;    # The base attribute supports 'lazy' conversion from URL strings    # to URL objects. Strings may be stored but when a string is    # fetched it will automatically be converted to a URL object.    # The main benefit is to make it much cheaper to say:    #   new URI::URL $random_url_string, 'http:'    if (defined($base) && !ref($base)) {	$base = new URI::URL $base;	$self->_elem('_base', $base); # set new object    }    $base;}1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?