- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
不带引号的词在 Perl 中似乎有很多含义。
print STDERR $msg;
$hash{key}
func( param => $arg )
my $x = str;
最佳答案
下图显示 Perl 如何按优先级降序解析标识符。
它也适用于 ::
链接的标识符(我将其称为“合格标识符”),除非另有说明。
sub foo { } # «foo» («sub» is covered later)
sub main::foo { } # «main::foo» («sub» is covered later)
method Class # «Class» («method» is covered later)
method Some::Class # «Some::Class» («method» is covered later)
$foo
$main::foo
//i
=head
<<FOO
Class::
Some::Class::
LABEL:
=>
或者当整个哈希索引表达式。 my %h = ( a => 1 );
$h{a}
${foo}
${main::foo}
请注意,使用关键字、命名运算符或声明的子名称将导致 ambiguous use
警告。 while (1) { }
sub { }
use
__END__
use Time::HiRes qw( time );
time
main::time
print $x, $y, $z;
$c = chr $i;
$t = time;
$t = CORE::time;
next
的操作数时, last
, redo
或 goto
. next LABEL;
sub foo { }
foo # Calls sub «foo»
main::foo # Calls sub «foo»
sub bar;
bar # Calls sub «bar»
use constant FOO => 123;
FOO # Replaced with the value of the constant.
::
的可能限定标识符,标量(包括数组元素或散列元素)或 block 。 method Class # Calls method «method» («Class» is covered earlier)
method Some::Class # Calls method «method» («Some::Class» is covered earlier)
method Class:: # Calls method «method» («Class» is covered earlier)
method Some::Class:: # Calls method «method» («Some::Class» is covered earlier)
method $o # Calls method «method»
method { $o } # Calls method «method»
Base::method Class # Calls method «Base::method» («Class» is covered earlier)
您可以使用 no indirect
以这种方式解析代码时发出警告的编译指示。 open(FH, '>', $qfn) or die $!; # Equivalent to open(*FH, ...) or ...;
print FH "Hello, World!\n"; # Equivalent to print *FH ...;
print main::FH "Hello, World!\n"; # Equivalent to print *main::FH ...;
Class->method(@args) # Uses the string «Class» as the invocant.
Some::Class->method(@args) # Uses the string «Some::Class» as the invocant.
-foo
-foo::bar
*
的子参数时. sub myprint(*@);
myprint(FH, "Hello, World\n");
myprint(main::FH, "Hello, World\n");
use strict qw( subs );
不允许这样做.funcname
在 sort funcname
.BEGIN
和类似的。它们有时充当关键字,有时充当声明的子。print
的子不遵循上述步骤。$ perl -M5.010 -e'
use subs qw( time );
eval { time; };
say $@ =~ /Undefined sub/ ? "ok" : "bad";
'
ok
$ perl -M5.010 -e'
use subs qw( system );
eval { system; };
say $@ =~ /Undefined sub/ ? "ok" : "bad";
'
ok
$ perl -M5.010 -e'
use subs qw( print );
eval { print; };
say $@ =~ /Undefined sub/ ? "ok" : "bad";
'
bad
我不知道是什么让那个特别,我不知道是否还有其他人。我猜是因为print
没有原型(prototype),但是system
也没有原型(prototype)。关于perl - Perl 如何解析未引用的裸词?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58263206/
我对 Lift Cookbook for AJAX Forms 感到困惑,我遇到了以下对象声明: object EchoForm extends { 这很令人困惑,所以我尝试了一下,它编译得很好。我的
我正尝试按照指示在裸 CSS 模态窗口内实现视频 here到目前为止效果很好。我遇到的唯一问题是视频在模态窗口打开之前自动启动(我必须保留视频“自动启动”选项)。模态窗口关闭时视频也不会停止。 是否有
同样,裸 char16_t 是有符号的还是无符号的?是否定义了实现? 最佳答案 来自标准(C++11 前草案 n3290,或 C++11 后草案 n3337)§3.9.1 基本类型: Types ch
我使用 C# 编程已经...有一段时间了。我最近编写了一个例程,我突然想到这是我第一次(我记得)我故意使用裸代码块(即没有前面的控制流语句)。代码看起来像这样: //... var output =
我最近开始使用 nativescript,但我遇到了一个似乎无法解决的问题。 我想要完成的是只打开一个基本的 WebView 并设置一个外部 url 来加载,例如 stackoverflow.com。
我通过以下方式创建了一个共享仓库: git init --bare my_project.git 在某个时候,另一个用户用他的更改更新了这个 repo(使用 git push )。 我如何检查共享存储
我刚刚浏览完 Google 搜索结果,其中包含所有关于 git 无法克隆空存储库是多么愚蠢的电子邮件咆哮。一些善良的灵魂甚至提交了一个补丁。在升级 git 之前,克隆空的、裸 git 存储库的最简单、
我喜欢编写一些 wordpress 模板,并搜索了一些可用的裸模板,我可以从这些模板开始。 因为我是 wordpress 的新手,你能推荐最好的裸模板作为我可以使用的基础吗? 干杯 最佳答案 在我看来
我正试图找到一个最新的答案,以使用 Godaddy 和 Heroku SSL 设置裸域。我的目标是让所有页面都登陆安全页面 https://www.example.com https://www.ex
这个问题在这里已经有了答案: What's the -practical- difference between a Bare and non-Bare repository? (11 个答案) 关
我运行一个 git 服务器,它只包含裸远程。比如说,我有一个名为 DIG.git 的裸 Remote ,我通常使用它进行克隆: git clone 55.66.77.88:git/DIG.git 我想
是否有一个用于裸 git repo 目录的 GUI(任何地方都没有工作树)我可以: 检查日志 查看任何提交的整个工作树结构 关于我为什么需要这个: 我的 git 是这样初始化的: git --git-
我有一台服务器托管我的几个项目的“裸”GIT 存储库。 我想知道如何将 GIT 移动到另一台服务器? 最佳答案 只需将父目录复制到新机器,并让 check out 的副本使用 git remote s
我有一个域 example.com 和 www.example.com。我正在为 DNS 使用 Heroku 和 Zerigo。现在我有一个从根域到 www.example.com 的转发从我的 Ho
我的服务器已经在 TCP 端口 80 和 443 上运行 IIS。我想通过 Internet 为我的所有团队成员提供一个集中的“推/pull ”Git 存储库。 所以我应该使用 HTTP 或 HTTP
裸露的 SUM 和包裹在 CALCULATE 中的 sum 有什么区别? Measure1 = SUM( tab[col1]) ) Measure2 = CALCULATE ( SUM( tab[co
我是一名优秀的程序员,十分优秀!