⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mm_vms.pm

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 PM
📖 第 1 页 / 共 4 页
字号:
	    else { $line .= $lib . '\n'; }	}	push @m, "\t\$(PERL) -e \"print qq{$line}\" >>\$(MMS\$TARGET)\n" if $line;    }    join('',@m);}=item dynamic_lib (override)Use VMS Link command.=cutsub dynamic_lib {    my($self, %attribs) = @_;    return '' unless $self->needs_linking(); #might be because of a subdir    return '' unless $self->has_link_code();    my($otherldflags) = $attribs{OTHERLDFLAGS} || "";    my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";    my $shr = $Config{'dbgprefix'} . 'PerlShr';    my(@m);    push @m,"OTHERLDFLAGS = $otherldflagsINST_DYNAMIC_DEP = $inst_dynamic_dep";    push @m, '$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)	If F$TrnLNm("',$shr,'").eqs."" Then Define/NoLog/User ',"$shr Sys\$Share:$shr.$Config{'dlext'}",'	Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option';    join('',@m);}=item static_lib (override)Use VMS commands to manipulate object library.=cutsub static_lib {    my($self) = @_;    return '' unless $self->needs_linking();    return '$(INST_STATIC) :	$(NOECHO) $(NOOP)' unless ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB});    my(@m,$lib);    push @m,'# Rely on suffix rule for update action$(OBJECT) : $(INST_ARCHAUTODIR)$(DFSEP).exists$(INST_STATIC) : $(OBJECT) $(MYEXTLIB)';    # If this extension has its own library (eg SDBM_File)    # then copy that to $(INST_STATIC) and add $(OBJECT) into it.    push(@m, "\t",'$(CP) $(MYEXTLIB) $(MMS$TARGET)',"\n") if $self->{MYEXTLIB};    push(@m,"\t",'If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)',"\n");    # if there was a library to copy, then we can't use MMS$SOURCE_LIST,    # 'cause it's a library and you can't stick them in other libraries.    # In that case, we use $OBJECT instead and hope for the best    if ($self->{MYEXTLIB}) {      push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(OBJECT)',"\n");    } else {      push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)',"\n");    }        push @m, "\t\$(NOECHO) \$(PERL) -e 1 >\$(INST_ARCHAUTODIR)extralibs.ld\n";    foreach $lib (split ' ', $self->{EXTRALIBS}) {      push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n");    }    join('',@m);}=item extra_clean_filesClean up some OS specific files.  Plus the temp file used to shortena lot of commands.=cutsub extra_clean_files {    return qw(              *.Map *.Dmp *.Lis *.cpp *.$(DLEXT) *.Opt $(BASEEXT).bso              .MM_Tmp             );}=item zipfile_target=item tarfile_target=item shdist_targetSyntax for invoking shar, tar and zip differs from that for Unix.=cutsub zipfile_target {    my($self) = shift;    return <<'MAKE_FRAG';$(DISTVNAME).zip : distdir	$(PREOP)	$(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) [.$(DISTVNAME)...]*.*;	$(RM_RF) $(DISTVNAME)	$(POSTOP)MAKE_FRAG}sub tarfile_target {    my($self) = shift;    return <<'MAKE_FRAG';$(DISTVNAME).tar$(SUFFIX) : distdir	$(PREOP)	$(TO_UNIX)        $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)...]	$(RM_RF) $(DISTVNAME)	$(COMPRESS) $(DISTVNAME).tar	$(POSTOP)MAKE_FRAG}sub shdist_target {    my($self) = shift;    return <<'MAKE_FRAG';shdist : distdir	$(PREOP)	$(SHAR) [.$(DISTVNAME)...]*.*; $(DISTVNAME).share	$(RM_RF) $(DISTVNAME)	$(POSTOP)MAKE_FRAG}# --- Test and Installation Sections ---=item install (override)Work around DCL's 255 character limit several times,and useVMS-style command line quoting in a few cases.=cutsub install {    my($self, %attribs) = @_;    my(@m);    push @m, q[install :: all pure_install doc_install	$(NOECHO) $(NOOP)install_perl :: all pure_perl_install doc_perl_install	$(NOECHO) $(NOOP)install_site :: all pure_site_install doc_site_install	$(NOECHO) $(NOOP)pure_install :: pure_$(INSTALLDIRS)_install	$(NOECHO) $(NOOP)doc_install :: doc_$(INSTALLDIRS)_install        $(NOECHO) $(NOOP)pure__install : pure_site_install	$(NOECHO) $(ECHO) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"doc__install : doc_site_install	$(NOECHO) $(ECHO) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"# This hack brought to you by DCL's 255-character command line limitpure_perl_install ::	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLPRIVLIB) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLBIN) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) " >>.MM_tmp	$(NOECHO) $(MOD_INSTALL) <.MM_tmp	$(NOECHO) $(RM_F) .MM_tmp	$(NOECHO) $(WARN_IF_OLD_PACKLIST) ].$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist').q[# Likewisepure_site_install ::	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLSITELIB) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLSITEBIN) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) " >>.MM_tmp	$(NOECHO) $(MOD_INSTALL) <.MM_tmp	$(NOECHO) $(RM_F) .MM_tmp	$(NOECHO) $(WARN_IF_OLD_PACKLIST) ].$self->catfile($self->{PERL_ARCHLIB},'auto',$self->{FULLEXT},'.packlist').q[pure_vendor_install ::	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp	$(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLVENDORLIB) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLVENDORBIN) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) " >>.MM_tmp	$(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) " >>.MM_tmp	$(NOECHO) $(MOD_INSTALL) <.MM_tmp	$(NOECHO) $(RM_F) .MM_tmp# Dittodoc_perl_install ::	$(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["	$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)	$(NOECHO) $(ECHO_N) "installed into|$(INSTALLPRIVLIB)|" >.MM_tmp	$(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp	$(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[	$(NOECHO) $(RM_F) .MM_tmp# And againdoc_site_install ::	$(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["	$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)	$(NOECHO) $(ECHO_N) "installed into|$(INSTALLSITELIB)|" >.MM_tmp	$(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp	$(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[	$(NOECHO) $(RM_F) .MM_tmpdoc_vendor_install ::	$(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["	$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)	$(NOECHO) $(ECHO_N) "installed into|$(INSTALLVENDORLIB)|" >.MM_tmp	$(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp	$(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[	$(NOECHO) $(RM_F) .MM_tmp];    push @m, q[uninstall :: uninstall_from_$(INSTALLDIRS)dirs	$(NOECHO) $(NOOP)uninstall_from_perldirs ::	$(NOECHO) $(UNINSTALL) ].$self->catfile($self->{PERL_ARCHLIB},'auto',$self->{FULLEXT},'.packlist').q[	$(NOECHO) $(ECHO) "Uninstall is now deprecated and makes no actual changes."	$(NOECHO) $(ECHO) "Please check the list above carefully for errors, and manually remove"	$(NOECHO) $(ECHO) "the appropriate files.  Sorry for the inconvenience."uninstall_from_sitedirs ::	$(NOECHO) $(UNINSTALL) ].$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist').q[	$(NOECHO) $(ECHO) "Uninstall is now deprecated and makes no actual changes."	$(NOECHO) $(ECHO) "Please check the list above carefully for errors, and manually remove"	$(NOECHO) $(ECHO) "the appropriate files.  Sorry for the inconvenience."];    join('',@m);}=item perldepend (override)Use VMS-style syntax for files; it's cheaper to just do it directly herethan to have the MM_Unix method call C<catfile> repeatedly.  Also, ifwe have to rebuild Config.pm, use MM[SK] to do it.=cutsub perldepend {    my($self) = @_;    my(@m);    push @m, '$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h$(OBJECT) : $(PERL_INC)av.h, $(PERL_INC)cc_runtime.h, $(PERL_INC)config.h$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)form.h$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h$(OBJECT) : $(PERL_INC)intrpvar.h, $(PERL_INC)iperlsys.h, $(PERL_INC)keywords.h$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)nostdio.h, $(PERL_INC)op.h$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlio.h$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlvars.h$(OBJECT) : $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)pp_proto.h$(OBJECT) : $(PERL_INC)proto.h, $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h$(OBJECT) : $(PERL_INC)regnodes.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h$(OBJECT) : $(PERL_INC)thread.h, $(PERL_INC)util.h, $(PERL_INC)vmsish.h' if $self->{OBJECT};     if ($self->{PERL_SRC}) {	my(@macros);	my($mmsquals) = '$(USEMAKEFILE)[.vms]$(FIRST_MAKEFILE)';	push(@macros,'__AXP__=1') if $Config{'archname'} eq 'VMS_AXP';	push(@macros,'DECC=1')    if $Config{'vms_cc_type'} eq 'decc';	push(@macros,'GNUC=1')    if $Config{'vms_cc_type'} eq 'gcc';	push(@macros,'SOCKET=1')  if $Config{'d_has_sockets'};	push(@macros,qq["CC=$Config{'cc'}"])  if $Config{'cc'} =~ m!/!;	$mmsquals .= '$(USEMACROS)' . join(',',@macros) . '$(MACROEND)' if @macros;	push(@m,q[# Check for unpropagated config.sh changes. Should never happen.# We do NOT just update config.h because that is not sufficient.# An out of date config.h is not fatal but complains loudly!$(PERL_INC)config.h : $(PERL_SRC)config.sh	$(NOOP)$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh	$(NOECHO) Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with config.h or genconfig.pl"	olddef = F$Environment("Default")	Set Default $(PERL_SRC)	$(MMS)],$mmsquals,);	if ($self->{PERL_ARCHLIB} =~ m|\[-| && $self->{PERL_SRC} =~ m|(\[-+)|) {	    my($prefix,$target) = ($1,$self->fixpath('$(PERL_ARCHLIB)Config.pm',0));	    $target =~ s/\Q$prefix/[/;	    push(@m," $target");	}	else { push(@m,' $(MMS$TARGET)'); }	push(@m,q[	Set Default 'olddef']);    }    push(@m, join(" ", map($self->fixpath($_,0),values %{$self->{XS}}))." : \$(XSUBPPDEPS)\n")      if %{$self->{XS}};    join('',@m);}=item makeaperl (override)Undertake to build a new set of Perl images using VMS commands.  SinceVMS does dynamic loading, it's not necessary to statically link eachextension into the Perl image, so this isn't the normal build path.Consequently, it hasn't really been tested, and may well be incomplete.=cutuse vars qw(%olbs);sub makeaperl {    my($self, %attribs) = @_;    my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmpdir, $libperl) =       @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};    my(@m);    push @m, "# --- MakeMaker makeaperl section ---MAP_TARGET    = $target";    return join '', @m if $self->{PARENT};    my($dir) = join ":", @{$self->{DIR}};    unless ($self->{MAKEAPERL}) {	push @m, q{$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)	$(NOECHO) $(ECHO) "Writing ""$(MMS$TARGET)"" for this $(MAP_TARGET)"	$(NOECHO) $(PERLRUNINST) \		Makefile.PL DIR=}, $dir, q{ \		FIRST_MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \		MAKEAPERL=1 NORECURS=1 };	push @m, map(q[ \\\n\t\t"$_"], @ARGV),q{$(MAP_TARGET) :: $(MAKE_APERL_FILE)	$(MAKE)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET)};	push @m, "\n";	return join '', @m;    }    my($linkcmd,@optlibs,@staticpkgs,$extralist,$targdir,$libperldir,%libseen);    local($_);    # The front matter of the linkcommand...    $linkcmd = join ' ', $Config{'ld'},	    grep($_, @Config{qw(large split ldflags ccdlflags)});    $linkcmd =~ s/\s+/ /g;    # Which *.olb files could we make use of...    local(%olbs);       # XXX can this be lexical?    $olbs{$self->{INST_ARCHAUTODIR}} = "$self->{BASEEXT}\$(LIB_EXT)";    require File::Find;    File::Find::find(sub {	return unless m/\Q$self->{LIB_EXT}\E$/;	return if m/^libperl/;	if( exists $self->{INCLUDE_EXT} ){		my $found = 0;		my $incl;		my $xx;		($xx = $File::Find::name) =~ s,.*?/auto/,,;		$xx =~ s,/?$_,,;		$xx =~ s,/,::,g;		# Throw away anything not explicitly marked for inclusion.		# DynaLoader is implied.		foreach $incl ((@{$self->{INCLUDE_EXT}},'DynaLoader')){			if( $xx eq $incl ){				$found++;				last;			}		}		return unless $found;	}	elsif( exists $self->{EXCLUDE_EXT} ){		my $excl;		my $xx;		($xx = $File::Find::name) =~ s,.*?/auto/,,;		$xx =~ s,/?$_,,;		$xx =~ s,/,::,g;		# Throw away anything explicitly marked for exclusion		foreach $excl (@{$self->{EXCLUDE_EXT}}){			return if( $xx eq $excl );		}	}	$olbs{$ENV{DEFAULT}} = $_;    }, grep( -d $_, @{$searchdirs || []}));    # We trust that what has been handed in as argument will be buildable    $static = [] unless $static;    @olbs{@{$static}} = (1) x @{$static};     $extra = [] unless $extra && ref $extra eq 'ARRAY';    # Sort the object libraries in inverse order of    # filespec length to try to insure that dependent extensions    # will appear before their parents, so the linker will    # search the parent library to resolve references.    # (e.g. Intuit::DWIM will precede Intuit, so unresolved    # references from [.intuit.dwim]dwim.obj can be found    # in [.intuit]intuit.olb).    for (sort { length($a) <=> length($b) } keys %olbs) {	next unless $olbs{$_} =~ /\Q$self->{LIB_EXT}\E$/;	my($dir) = $self->fixpath($_,1);	my($extralibs) = $dir . "extralibs.ld";	my($extopt) = $dir . $olbs{$_};	$extopt =~ s/$self->{LIB_EXT}$/.opt/;	push @optlibs, "$dir$olbs{$_}";	# Get external libraries this extension will need	if (-f $extralibs ) {	    my %seenthis;	    open LIST,$extralibs or warn $!,next;	    while (<LIST>) {		chomp;		# Include a library in the link only once, unless it's mentioned		# multiple times within a single extension's options file, in which		# case we assume the builder needed to search it again later in the		# link.		my $skip = exists($libseen{$_}) && !exists($seenthis{$_});		$libseen{$_}++;  $seenthis{$_}++;		next if $skip;		push @$extra,$_;	    }	    close LIST;	}	# Get full name of extension for ExtUtils::Miniperl	if (-f $extopt) {	    open OPT,$extopt or die $!;	    while (<OPT>) {		next unless /(?:UNIVERSAL|VECTOR)=boot_([\w_]+)/;		my $pkg = $1;		$pkg =~ s#__*#::#g;		push @staticpkgs,$pkg;	    }	}    }    # Place all of the external libraries after all of the Perl extension    # libraries in the final link, in order to maximize the opportunity    # for XS code from multiple extensions to resolve symbols against the    # same external library while only including that library once.    push @optlibs, @$extra;

⌨️ 快捷键说明

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