demo_cycle.pl

来自「source of perl for linux application,」· PL 代码 · 共 26 行

PL
26
字号
package Selfish;sub TIESCALAR {	use Data::Dumper 'Dumper';	print Dumper [ \@_ ];	bless [ @_[1..$#_] ], $_[0];}sub FETCH {	use Data::Dumper 'Dumper';	Dumper [ @{$_[0]} ];}package main;use Attribute::Handlers autotieref => { Selfish => Selfish };my $next : Selfish("me");print "$next\n";my $last : Selfish("you","them","who?");print "$last\n";my $other : Selfish(["you","them","who?"]);print "$other\n";

⌨️ 快捷键说明

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