;;; you need .. ;;; YAML::Syck ;;; Class::Inspector (defun perl-class-inspector-functions (class) (interactive) (let ((buffer-name (concat "*functions " class "*"))) (if (get-buffer buffer-name) (progn (set-buffer buffer-name)) (progn (shell-command (concat "perl -MClass::Inspector -MYAML::Syck -e" "'use " class "; print Dump(Class::Inspector->functions('" class "')) '")) (set-buffer "*Shell Command Output*") (rename-buffer buffer-name))))) (defun perl-class-inspector-functions-at-point () (interactive) (perl-class-inspector-functions (cperl-word-at-point)))
Emacsã§Perlãç·¨éä¸ã«ãããã¼â¯â¯ã®ã¢ã¸ã¥ã¼ã«ã«å ¥ã£ã¦ãé¢æ°ä¸è¦§ã表示ããããã£ã¦æãã®æã«ä½¿ããä¾ãã°ãLWP::UserAgentãã®é¢æ°ä¸è¦§ã表示ãããã®ãªããEmacsã®ãããã¡å ã§ãLWP::UserAgentãã«ã«ã¼ã½ã«ãåãã㦠M-x perl-class-inspector-functions-at-pointããããã¨
--- - _agent - _need_proxy - _new_response - _process_colonic_headers - _request_sanity_check - agent - clone - conn_cache - cookie_jar - credentials - default_header - default_headers - env_proxy - from - get - get_basic_credentials - head - is_protocol_supported - max_redirect - max_size - mirror - new - no_proxy - parse_head - post - prepare_request - protocols_allowed - protocols_forbidden - proxy - redirect_ok - request - requests_redirectable - send_request - simple_request - timeout - use_alarm - use_eval *functions LWP::UserAgent*
ãããªæãã®åºåãåºããç°¡åãªãªãã¡ã¬ã³ã¹ã¨ãã¦ããããã¯dabbrev(åçãªç¥ç§°å±é)ã®åè£ã¨ãã¦ä½¿ãã®ã«æå¹ããªãã
禿ãããããã M-x cperl-perldoc-at-point ã§ããã?ããªãã ãã©ãperldocéãã¨dabbrevããæã«å ¨ç¶é¢ä¿ãªãåèªãåè£ã«å«ã¾ããããã«ãªã£ã¦ãã¾ã£ã¦ããã¼ãããªæãããããªãã¨ã
å®éã«å½¹ã«ç«ã£ã¦ããããã©ããã¯ã¾ã æªæ¤è¨¼....
ã
Class::Inspector
é¢æ°ã®ä¸è¦§ãçæããã®ã«Class::Inspectorというモジュールã使ã£ã¦ã¾ãããªãã¬ã¯ã·ã§ã³/ã¤ã³ããã¹ãã¯ã·ã§ã³? ãªã¢ã¸ã¥ã¼ã«ããããç¡ãã¨åããªãã§ãã
ã©ããã£ã¦é¢æ°ã®ãªã¹ããä½ã£ã¦ããã ããã¨Class::Inspectorã®ã½ã¼ã¹ãè¦ãã
sub functions { my $class = shift; my $name = $class->_class(shift) or return undef; return undef unless $class->loaded( $name ); # Get all the CODE symbol table entries my @functions = sort grep { /$RE_IDENT/o } grep { defined &{"${name}::$_"} } keys %{"${name}::"}; ?@functions; }
èã¯ãã®é¨åã ãã ã£ããã·ã³ãã«ã ãããã¼ãããã¯ã©ã¹ã®ã·ã³ãã«ãã¼ãã«ããCODEã ãæãåºãã¦ãã