Skip to content

Instantly share code, notes, and snippets.

@syohex
Created July 8, 2012 01:14
Show Gist options
  • Save syohex/3068880 to your computer and use it in GitHub Desktop.
Save syohex/3068880 to your computer and use it in GitHub Desktop.
Show module methods which are specified by ARGV
% ./print_methods.sh Moose Furl Text::Xslate
Moose::after
Moose::around
Moose::as
Moose::augment
Moose::before
Moose::blessed
Moose::bootstrap
Moose::class_type
Moose::coerce
Moose::confess
Moose::duck_type
Moose::enum
Moose::extends
Moose::find_type_constraint
Moose::from
Moose::has
Moose::import
Moose::init_meta
Moose::inline_as
Moose::inner
Moose::match_on_type
Moose::maybe_type
Moose::message
Moose::optimize_as
Moose::override
Moose::register_type_constraint
Moose::role_type
Moose::subtype
Moose::super
Moose::throw_error
Moose::type
Moose::unimport
Moose::union
Moose::via
Moose::where
Moose::with
Furl::agent
Furl::delete
Furl::env_proxy
Furl::get
Furl::head
Furl::new
Furl::post
Furl::put
Furl::request
Exporter::as_heavy
Text::Xslate::bootstrap
Text::Xslate::Engine::compile
Text::Xslate::Engine::current_engine
Text::Xslate::Engine::current_file
Text::Xslate::Engine::current_line
Text::Xslate::Engine::current_vars
Text::Xslate::Engine::default_functions
Text::Xslate::Engine::dump
Text::Xslate::escaped_string
Exporter::export
Exporter::export_fail
Exporter::export_ok_tags
Exporter::export_tags
Exporter::export_to_level
Text::Xslate::Engine::find_file
Text::Xslate::html_builder
Text::Xslate::html_escape
Exporter::import
Text::Xslate::input_layer
Text::Xslate::Engine::load_file
Text::Xslate::Engine::load_string
Text::Xslate::Engine::make_error
Text::Xslate::mark_raw
Text::Xslate::Engine::new
Text::Xslate::Engine::note
Text::Xslate::Engine::options
Text::Xslate::Engine::print
Text::Xslate::Engine::render
Text::Xslate::Engine::render_string
Exporter::require_version
Text::Xslate::Engine::slurp_template
Text::Xslate::unmark_raw
Text::Xslate::uri_escape
#!/bin/sh
LOAD_OPT=
for module in "$@"
do
LOAD_OPT="$LOAD_OPT -M$module"
done
PERL_MODULES="-MClass::Inspector $LOAD_OPT"
perl $PERL_MODULES -le 'my @a; do { push @a, @{Class::Inspector->methods($_, "full", "public")} } for @ARGV; END { print $_ for @a}' "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment