335ããã®è¨äº(minilla を使って cocoa な xs module を書く - soh335 memo)ãè¦ã¦ãæ軽ã«CocoaãªXS moduleãæ¸ããããã«ãªã£ãããããã¨ãç¥ã£ãã®ã§ããã£ã¨æ¸ãã¦ã¿ãã
akiym/Cocoa-NetworkChange · GitHub
èªå®
ã®Wi-Fiã«æ¥ç¶ãããsyncãããã¨ããèªè¨¼ããã¨ãã£ãã¨ãã«ä¾¿å©ã
use strict; use warnings; use Cocoa::EventLoop; use Cocoa::NetworkChange; on_network_change(sub { my ($wlan) = @_; # on connected if ($wlan->{ssid} && $wlan->{ssid} =~ /aterm/) { # ... } }, sub { # on disconnected }); Cocoa::EventLoop->run;
ã¡ã¢
- minil buildããã¨ãã«ã¯git addãå¿ãã¦ããªãã確èªãã
- XSUtilã§ããcc_src_pathsãæå®ãããã¨ããModule::Buildã§ã¯c_sourceãæå®ãããã.mã«å¯¾å¿ãã¦ããªãã®ã§include_dirsã¨objectsãåå¥ã«æå®ãã