亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? struct.pm

?? autoconf 2.59版,可用于redhat系統.用于編譯原碼,編寫makefile文件.
?? PM
?? 第 1 頁 / 共 2 頁
字號:
=head2 The C<struct()> functionThe C<struct> function has three forms of parameter-list.    struct( CLASS_NAME => [ ELEMENT_LIST ]);    struct( CLASS_NAME => { ELEMENT_LIST });    struct( ELEMENT_LIST );The first and second forms explicitly identify the name of theclass being created.  The third form assumes the current packagename as the class name.An object of a class created by the first and third forms isbased on an array, whereas an object of a class created by thesecond form is based on a hash. The array-based forms will besomewhat faster and smaller; the hash-based forms are moreflexible.The class created by C<struct> must not be a subclass of anotherclass other than C<UNIVERSAL>.It can, however, be used as a superclass for other classes. To facilitatethis, the generated constructor method uses a two-argument blessing.Furthermore, if the class is hash-based, the key of each element isprefixed with the class name (see I<Perl Cookbook>, Recipe 13.12).A function named C<new> must not be explicitly defined in a classcreated by C<struct>.The I<ELEMENT_LIST> has the form    NAME => TYPE, ...Each name-type pair declares one element of the struct. Eachelement name will be defined as an accessor method unless amethod by that name is explicitly defined; in the latter case, awarning is issued if the warning flag (B<-w>) is set.=head2 Element Types and Accessor MethodsThe four element types -- scalar, array, hash, and class -- arerepresented by strings -- C<'$'>, C<'@'>, C<'%'>, and a class name --optionally preceded by a C<'*'>.The accessor method provided by C<struct> for an element dependson the declared type of the element.=over=item Scalar (C<'$'> or C<'*$'>)The element is a scalar, and by default is initialized to C<undef>(but see L<Initializing with new>).The accessor's argument, if any, is assigned to the element.If the element type is C<'$'>, the value of the element (afterassignment) is returned. If the element type is C<'*$'>, a referenceto the element is returned.=item Array (C<'@'> or C<'*@'>)The element is an array, initialized by default to C<()>.With no argument, the accessor returns a reference to theelement's whole array (whether or not the element wasspecified as C<'@'> or C<'*@'>).With one or two arguments, the first argument is an indexspecifying one element of the array; the second argument, ifpresent, is assigned to the array element.  If the element typeis C<'@'>, the accessor returns the array element value.  If theelement type is C<'*@'>, a reference to the array element isreturned.=item Hash (C<'%'> or C<'*%'>)The element is a hash, initialized by default to C<()>.With no argument, the accessor returns a reference to theelement's whole hash (whether or not the element wasspecified as C<'%'> or C<'*%'>).With one or two arguments, the first argument is a key specifyingone element of the hash; the second argument, if present, isassigned to the hash element.  If the element type is C<'%'>, theaccessor returns the hash element value.  If the element type isC<'*%'>, a reference to the hash element is returned.=item Class (C<'Class_Name'> or C<'*Class_Name'>)The element's value must be a reference blessed to the namedclass or to one of its subclasses. The element is initialized tothe result of calling the C<new> constructor of the named class.The accessor's argument, if any, is assigned to the element. Theaccessor will C<croak> if this is not an appropriate objectreference.If the element type does not start with a C<'*'>, the accessorreturns the element value (after assignment). If the element typestarts with a C<'*'>, a reference to the element itself is returned.=back=head2 Initializing with C<new>C<struct> always creates a constructor called C<new>. That constructormay take a list of initializers for the various elements of the newstruct.Each initializer is a pair of values: I<element name>C< =E<gt> >I<value>.The initializer value for a scalar element is just a scalar value. Theinitializer for an array element is an array reference. The initializerfor a hash is a hash reference.The initializer for a class element is also a hash reference, and thecontents of that hash are passed to the element's own constructor.See Example 3 below for an example of initialization.=head1 EXAMPLES=over=item Example 1Giving a struct element a class type that is also a struct is howstructs are nested.  Here, C<timeval> represents a time (seconds andmicroseconds), and C<rusage> has two elements, each of which is oftype C<timeval>.    use Autom4te::Struct;    struct( rusage => {        ru_utime => timeval,  # seconds        ru_stime => timeval,  # microseconds    });    struct( timeval => [        tv_secs  => '$',        tv_usecs => '$',    ]);        # create an object:    my $t = new rusage;        # $t->ru_utime and $t->ru_stime are objects of type timeval.        # set $t->ru_utime to 100.0 sec and $t->ru_stime to 5.0 sec.    $t->ru_utime->tv_secs(100);    $t->ru_utime->tv_usecs(0);    $t->ru_stime->tv_secs(5);    $t->ru_stime->tv_usecs(0);=item Example 2An accessor function can be redefined in order to provideadditional checking of values, etc.  Here, we want the C<count>element always to be nonnegative, so we redefine the C<count>accessor accordingly.    package MyObj;    use Autom4te::Struct;    # declare the struct    struct ( 'MyObj', { count => '$', stuff => '%' } );    # override the default accessor method for 'count'    sub count {        my $self = shift;        if ( @_ ) {            die 'count must be nonnegative' if $_[0] < 0;            $self->{'count'} = shift;            warn "Too many args to count" if @_;        }        return $self->{'count'};    }    package main;    $x = new MyObj;    print "\$x->count(5) = ", $x->count(5), "\n";                            # prints '$x->count(5) = 5'    print "\$x->count = ", $x->count, "\n";                            # prints '$x->count = 5'    print "\$x->count(-5) = ", $x->count(-5), "\n";                            # dies due to negative argument!=item Example 3The constructor of a generated class can be passed a listof I<element>=>I<value> pairs, with which to initialize the struct.If no initializer is specified for a particular element, its defaultinitialization is performed instead. Initializers for non-existentelements are silently ignored.Note that the initializer for a nested struct is specifiedas an anonymous hash of initializers, which is passed on to the nestedstruct's constructor.    use Autom4te::Struct;    struct Breed =>    {        name  => '$',        cross => '$',    };    struct Cat =>    [        name     => '$',        kittens  => '@',        markings => '%',        breed    => 'Breed',    ];    my $cat = Cat->new( name     => 'Socks',                        kittens  => ['Monica', 'Kenneth'],                        markings => { socks=>1, blaze=>"white" },                        breed    => { name=>'short-hair', cross=>1 },                      );    print "Once a cat called ", $cat->name, "\n";    print "(which was a ", $cat->breed->name, ")\n";    print "had two kittens: ", join(' and ', @{$cat->kittens}), "\n";=back=head1 Author and Modification HistoryModified by Akim Demaille, 2001-08-03    Rename as Autom4te::Struct to avoid name clashes with    Class::Struct.    Make it compatible with Perl 5.5.Modified by Damian Conway, 1999-03-05, v0.58.    Added handling of hash-like arg list to class ctor.    Changed to two-argument blessing in ctor to support    derivation from created classes.    Added classname prefixes to keys in hash-based classes    (refer to "Perl Cookbook", Recipe 13.12 for rationale).    Corrected behavior of accessors for '*@' and '*%' struct    elements.  Package now implements documented behavior when    returning a reference to an entire hash or array element.    Previously these were returned as a reference to a reference    to the element.Renamed to C<Class::Struct> and modified by Jim Miner, 1997-04-02.    members() function removed.    Documentation corrected and extended.    Use of struct() in a subclass prohibited.    User definition of accessor allowed.    Treatment of '*' in element types corrected.    Treatment of classes as element types corrected.    Class name to struct() made optional.    Diagnostic checks added.Originally C<Class::Template> by Dean Roehrich.    # Template.pm   --- struct/member template builder    #   12mar95    #   Dean Roehrich    #    # changes/bugs fixed since 28nov94 version:    #  - podified    # changes/bugs fixed since 21nov94 version:    #  - Fixed examples.    # changes/bugs fixed since 02sep94 version:    #  - Moved to Class::Template.    # changes/bugs fixed since 20feb94 version:    #  - Updated to be a more proper module.    #  - Added "use strict".    #  - Bug in build_methods, was using @var when @$var needed.    #  - Now using my() rather than local().    #    # Uses perl5 classes to create nested data types.    # This is offered as one implementation of Tom Christiansen's "structs.pl"    # idea.=cut### Setup "GNU" style for perl-mode and cperl-mode.## Local Variables:## perl-indent-level: 2## perl-continued-statement-offset: 2## perl-continued-brace-offset: 0## perl-brace-offset: 0## perl-brace-imaginary-offset: 0## perl-label-offset: -2## cperl-indent-level: 2## cperl-brace-offset: 0## cperl-continued-brace-offset: 0## cperl-label-offset: -2## cperl-extra-newline-before-brace: t## cperl-merge-trailing-else: nil## cperl-continued-statement-offset: 2## End:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线免费| 亚洲国产精品高清| 99vv1com这只有精品| 国产99精品在线观看| 国产69精品久久久久777| 国产成人在线免费| 粉嫩久久99精品久久久久久夜| 国内精品国产成人| 丁香啪啪综合成人亚洲小说| 日本久久一区二区| 色婷婷av一区| 欧美日本在线播放| 精品动漫一区二区三区在线观看| 欧美成人一区二区| 国产欧美一区二区三区鸳鸯浴| 中文字幕中文字幕中文字幕亚洲无线| 国产精品理论在线观看| 亚洲猫色日本管| 天涯成人国产亚洲精品一区av| 青青草精品视频| 国产一区啦啦啦在线观看| 国产成人精品三级麻豆| 91在线观看污| 欧美精品乱码久久久久久| 欧美成人精精品一区二区频| 国产精品全国免费观看高清| 亚洲国产精品精华液网站| 日韩电影一区二区三区| 国产福利一区在线观看| 一本色道久久综合亚洲精品按摩| 欧美精品在线观看播放| 国产精品免费久久| 婷婷开心久久网| 国产成人免费视频精品含羞草妖精| 99精品久久久久久| 欧美成人福利视频| 一区二区在线观看免费视频播放| 青娱乐精品在线视频| 成人激情免费电影网址| 51久久夜色精品国产麻豆| 日本一区二区三区四区| 美女被吸乳得到大胸91| 91免费版pro下载短视频| 精品国产乱码久久久久久免费| 中文字幕一区二区在线观看| 免费成人在线播放| 在线视频一区二区三| 久久影视一区二区| 日本在线不卡一区| 在线免费观看日本一区| 日本一区二区视频在线| 奇米综合一区二区三区精品视频| 成人久久18免费网站麻豆| 精品乱人伦一区二区三区| 五月天一区二区| 不卡一卡二卡三乱码免费网站| 日韩一二三四区| 亚洲一区二区三区四区在线免费观看 | 色综合激情五月| 精品国产亚洲在线| 日韩 欧美一区二区三区| 在线观看亚洲a| 亚洲人一二三区| caoporn国产精品| 国产日韩一级二级三级| 狠狠色丁香婷婷综合| 精品少妇一区二区三区免费观看| 亚洲与欧洲av电影| 欧美亚男人的天堂| 日韩毛片一二三区| 91免费视频大全| 日韩一区欧美一区| 日本韩国精品在线| 亚欧色一区w666天堂| 欧美亚洲高清一区| 日韩精品亚洲专区| 91精品国产91久久综合桃花| 免费xxxx性欧美18vr| 日韩免费高清av| 国产一区二区三区日韩| 国产午夜亚洲精品午夜鲁丝片| 国产在线精品不卡| 久久久影视传媒| eeuss国产一区二区三区| 一区二区三区日韩精品| 6080日韩午夜伦伦午夜伦| 日本网站在线观看一区二区三区 | 欧美激情一区二区三区四区| 国产精品亚洲一区二区三区妖精| 欧美国产综合色视频| 91在线播放网址| 亚洲国产成人高清精品| 精品国产一区二区三区忘忧草| 国产成人午夜视频| 亚洲伦理在线精品| 日韩一级大片在线| 成年人午夜久久久| 午夜成人免费电影| 国产亚洲自拍一区| 日本高清免费不卡视频| 免费精品视频在线| 国产精品久久久久久亚洲毛片 | 久久99久久99小草精品免视看| 精品88久久久久88久久久| 成人国产精品免费网站| 偷窥少妇高潮呻吟av久久免费| 欧美mv日韩mv亚洲| 91国产精品成人| 国产在线观看免费一区| 一区二区成人在线视频| 久久综合久久综合亚洲| 在线观看一区不卡| 国产激情91久久精品导航| 亚洲国产精品精华液网站| 中文av一区二区| 制服丝袜av成人在线看| k8久久久一区二区三区| 美女视频一区二区三区| 一区二区三区欧美在线观看| 国产性做久久久久久| 欧美乱妇20p| 成人动漫一区二区在线| 免费成人你懂的| 一区二区三区小说| 国产精品色婷婷| 精品国产乱码久久久久久久 | 调教+趴+乳夹+国产+精品| 国产精品美日韩| www激情久久| 日韩三级免费观看| 精品婷婷伊人一区三区三| 91一区二区三区在线观看| 精品一区二区三区免费视频| 日韩影视精彩在线| 亚洲国产精品麻豆| 亚洲综合男人的天堂| 最新热久久免费视频| 欧美极品另类videosde| 国产网站一区二区| 一本到高清视频免费精品| 美女www一区二区| 亚洲日本在线a| 欧美国产成人在线| 日本一区二区三区国色天香| 色婷婷亚洲综合| 另类专区欧美蜜桃臀第一页| 亚洲成a人v欧美综合天堂下载| 亚洲国产精品成人综合色在线婷婷| 成人手机电影网| 国产精品传媒视频| 国产精品毛片大码女人| 无吗不卡中文字幕| 成人免费高清视频| 欧美精品v日韩精品v韩国精品v| 久久网站热最新地址| 亚洲免费资源在线播放| 蜜桃久久av一区| 欧美v日韩v国产v| 中文字幕在线免费不卡| 久久aⅴ国产欧美74aaa| 色婷婷激情久久| 久久久久久免费毛片精品| 亚洲成人三级小说| 高清视频一区二区| 日韩视频一区二区三区| 亚洲精品乱码久久久久久久久 | 亚洲女同女同女同女同女同69| 日韩黄色免费网站| 色吧成人激情小说| 欧美国产亚洲另类动漫| 久久99久久久久久久久久久| av在线不卡电影| 精品久久99ma| 免费xxxx性欧美18vr| 欧美日韩国产免费一区二区| 中文字幕乱码久久午夜不卡| 免费成人你懂的| 欧美日韩日本视频| 亚洲欧美激情在线| 成人手机电影网| 国产欧美日本一区视频| 黄色日韩三级电影| 日韩欧美一区二区久久婷婷| 亚洲成av人片在www色猫咪| 99久久久久久99| 久久久国产精华| 国产在线精品国自产拍免费| 欧美一区二区美女| 蜜臂av日日欢夜夜爽一区| 欧美日韩精品三区| 香蕉加勒比综合久久| 欧美日韩电影一区| 亚洲国产精品尤物yw在线观看| 欧洲另类一二三四区| 一区二区不卡在线视频 午夜欧美不卡在| 不卡视频在线看| 亚洲女性喷水在线观看一区| 色天天综合久久久久综合片| 亚洲激情自拍偷拍| 欧美色男人天堂|