这个问题来自我对包管理器缺乏了解,我运行yum list并得到httpd-2.4.6-40.el7.centos.4.x86_64
Build date: Mon Jul 18 17:32:11 2016
Run Code Online (Sandbox Code Playgroud)
我做了yum update && yum install httpd,这会让我获得最新版本的 httpd 吗?
我在哪里可以在线检查以确认我的包/版本是最新的?
如何定期为我的 httpd 版本安装安全补丁?
更新
[centos ~]$ httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Jul 18 2016 15:30:14
[centos ~]$ rpm -q --changelog httpd | more
* Mon Jul 18 2016 CentOS Sources <bugs@centos.org> - 2.4.6-40.el7.centos.4
- Remove index.html, add centos-noindex.tar.gz
- change vstring
- change symlink for poweredby.png
- update welcome.conf with proper aliases
Run Code Online (Sandbox Code Playgroud) 我目前有以下内容
# $dog, $cat, $rat are all hash refs
my %rethash = ('success' => 'Your Cool');
my %ref ={ 'dog' => $dog, 'cat' => $cat, 'mouse' => $rat,
'chicken' => '' };
my $perlobj = ( \%ref,\%rethash );
Run Code Online (Sandbox Code Playgroud)
当$ perlobj被转储时,这就是结果
$VAR1 = {
'success' => 'Your Cool'
};
Run Code Online (Sandbox Code Playgroud)
但是,当启用警告时,我收到以下消息
Useless use of reference constructor in void context at ..
Run Code Online (Sandbox Code Playgroud)
我意识到使用{}分配%ref的方法存在严重错误,这段代码有什么问题?我似乎无法摆脱这个警告......
编辑:好的我想我发现了什么,
my $perlobj = ( \%ref,\%rethash );
Run Code Online (Sandbox Code Playgroud)
这不会合并但会导致$ perlobj成为%rethash的引用,这在阅读您的回复后很明显.